---
title: "System::Text::Json::JsonMemoryMarshal::Read method"
url: "https://reference.aspose.com/pdf/cpp/system.text.json/jsonmemorymarshal/read/"
product: "Aspose.PDF for C++ API Reference"
description: "System::Text::Json::JsonMemoryMarshal::Read method. Reads a value of type T from the beginning of the specified byte span in C++."
---

## JsonMemoryMarshal::Read(const ReadOnlySpan\<uint8_t\>\&) method


Reads a value of type T from the beginning of the specified byte span.

```cpp
template<typename T> static T System::Text::Json::JsonMemoryMarshal::Read(const ReadOnlySpan<uint8_t> &source)
```


| Parameter | Description |
| --- | --- |
| T | The type of the value to read. |

| Parameter | Type | Description |
| --- | --- | --- |
| source | const ReadOnlySpan\<uint8_t\>\& | The byte span to read from. |

### ReturnValue

The value read from the span.

## See Also

* Class [ReadOnlySpan](../../../system/readonlyspan/)
* Class [JsonMemoryMarshal](../)
* Namespace [System::Text::Json](../../)
* Library [Aspose.PDF for C++](../../../)
## JsonMemoryMarshal::Read(const Span\<uint8_t\>\&) method


Reads a value of type T from the beginning of the specified byte span.

```cpp
template<typename T> static T System::Text::Json::JsonMemoryMarshal::Read(const Span<uint8_t> &source)
```


| Parameter | Description |
| --- | --- |
| T | The type of the value to read. |

| Parameter | Type | Description |
| --- | --- | --- |
| source | const Span\<uint8_t\>\& | The byte span to read from. |

### ReturnValue

The value read from the span.

## See Also

* Class [Span](../../../system/span/)
* Class [JsonMemoryMarshal](../)
* Namespace [System::Text::Json](../../)
* Library [Aspose.PDF for C++](../../../)
