CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
json_document.h
1#pragma once
2
3#include <system/value_tuple.h>
4#include <system/idisposable.h>
5#include <system/default.h>
6#include <system/collections/iequality_comparer.h>
7#include <system/array.h>
8#include <system/memory.h>
9#include <cstdint>
10
11#include "system/text/json/json_token_type.h"
12#include "system/text/json/document/json_document_options.h"
13#include "system/text/json/document/json_property.h"
14
15namespace System
16{
17template <typename> class ArraySegment;
18namespace Buffers
19{
20template <typename> class ReadOnlySequence;
21} // namespace Buffers
22namespace Collections
23{
24namespace Generic
25{
26template <typename> class HashSet;
27} // namespace Generic
28} // namespace Collections
29class DateTime;
30class DateTimeOffset;
31class Decimal;
32class Guid;
33namespace IO
34{
35class Stream;
36} // namespace IO
37template <typename> class ReadOnlySpan;
38namespace Text
39{
40namespace Json
41{
42class JsonElement;
43class JsonProperty;
45class JsonSerializer;
46namespace Nodes
47{
48class JsonNode;
49} // namespace Nodes
52{
53namespace Converters
54{
56} // namespace Converters
57} // namespace Serialization
58class Utf8JsonReader;
59class Utf8JsonWriter;
60} // namespace Json
61} // namespace Text
62} // namespace System
63
64namespace System {
65
66namespace Text {
67
68namespace Json {
69
70class ASPOSECPP_SHARED_CLASS JsonDocument final : public IDisposable
71{
72 typedef JsonDocument ThisType;
73 typedef IDisposable BaseType;
74
75 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
76 ASPOSECPP_SHARED_RTTI_INFO_DECL();
77
78 friend class JsonElement;
79 friend class JsonSerializer;
82
83protected:
84
85 struct DbRow
86 {
87 public:
88
89 static const int32_t Size = 12;
90
91 int32_t get_Location() const;
92 int32_t get_SizeOrLength() const;
93 bool get_IsUnknownSize() const;
95 int32_t get_NumberOfRows() const;
97
98 static const int32_t UnknownSize = -1;
99
100 bool get_IsSimpleValue() const;
101
102 DbRow(JsonTokenType jsonTokenType, int32_t location, int32_t sizeOrLength);
104
105 private:
106
107 int32_t _location;
108 int32_t _sizeOrLengthUnion;
109 int32_t _numberOfRowsAndTypeUnion;
110
111 };
112
113private:
114
115 class MetadataDb : public IDisposable, public System::Details::BoxableObjectBase
116 {
117 typedef MetadataDb ThisType;
118 typedef IDisposable BaseType;
119
120 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
121 ASPOSECPP_SHARED_RTTI_INFO_DECL();
122
123 public:
124
125 ASPOSECPP_VALUE_TYPE_IMPLEMENTS_INTERFACES();
126
127 public:
128
129 int32_t get_Length();
130
131 MetadataDb(System::SharedPtr<Array<uint8_t>> completeDb);
132
133 static JsonDocument::MetadataDb CreateRented(int32_t payloadLength, bool convertToAlloc);
134 static JsonDocument::MetadataDb CreateLocked(int32_t payloadLength);
135 void Dispose() override;
136 void CompleteAllocations();
137 void Append(JsonTokenType tokenType, int32_t startLocation, int32_t length);
138 void SetLength(int32_t index, int32_t length);
139 void SetNumberOfRows(int32_t index, int32_t numberOfRows);
140 void SetHasComplexChildren(int32_t index);
141 int32_t FindIndexOfFirstUnsetSizeOrLength(JsonTokenType lookupType);
142 JsonDocument::DbRow Get(int32_t index);
143 JsonTokenType GetJsonTokenType(int32_t index);
144 JsonDocument::MetadataDb CopySegment(int32_t startIndex, int32_t endIndex);
145
146 MetadataDb();
147
148 protected:
149
150 #ifdef ASPOSE_GET_SHARED_MEMBERS
151 void GetSharedMembers(System::Object::shared_members_type& result) const override;
152 #endif
153
154 private:
155
156 static const int32_t SizeOrLengthOffset = 4;
157 static const int32_t NumberOfRowsOffset = 8;
158 int32_t pr_Length;
159
160 void set_Length(int32_t value);
161
163 bool _convertToAlloc;
164 bool _isLocked;
165
166 MetadataDb(System::SharedPtr<Array<uint8_t>> initialDb, bool isLocked, bool convertToAlloc);
167
168 MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(MetadataDb, CODEPORTING_ARGS(System::SharedPtr<Array<uint8_t>> initialDb, bool isLocked, bool convertToAlloc));
169
170 void Enlarge();
171 void AssertValidIndex(int32_t index);
172 int32_t FindOpenElement(JsonTokenType lookupType);
173
174 };
175
176 // Ensure this stays on the stack by making it a ref struct.
177 class PropertyNameSet : public System::Object
178 {
179 typedef PropertyNameSet ThisType;
180 typedef System::Object BaseType;
181
182 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
183 ASPOSECPP_SHARED_RTTI_INFO_DECL();
184
185 private:
186
187 class InlineRangeArray16 : public System::Object, public System::Details::BoxableObjectBase
188 {
189 typedef InlineRangeArray16 ThisType;
190 typedef System::Object BaseType;
191
192 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
193 ASPOSECPP_SHARED_RTTI_INFO_DECL();
194
195 public:
196
197 InlineRangeArray16();
198
199 ValueTuple<int32_t, int32_t>& operator[](int32_t index);
200 const ValueTuple<int32_t, int32_t>& operator[](int32_t index) const;
201
202 protected:
203
204 #ifdef ASPOSE_GET_SHARED_MEMBERS
205 void GetSharedMembers(System::Object::shared_members_type& result) const override;
206 #endif
207
208 private:
209
210 ValueTuple<int32_t, int32_t> _elements[16];
211
212 };
213
214 class PropertyNameComparer final : public Collections::Generic::IEqualityComparer<ReadOnlyMemory<uint8_t>>
215 {
216 typedef PropertyNameComparer ThisType;
218
219 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
220 ASPOSECPP_SHARED_RTTI_INFO_DECL();
221
222 public:
223
225
226 bool Equals(ReadOnlyMemory<uint8_t> left, ReadOnlyMemory<uint8_t> right) const override;
227 int32_t GetHashCode(ReadOnlyMemory<uint8_t> name) const override;
228
229 };
230
231 public:
232
233 PropertyNameSet();
234
235 void SetCapacity(int32_t capacity);
236 void AddPropertyName(JsonProperty property, System::SharedPtr<JsonDocument> document);
237 void Reset();
238 void Dispose();
239
240 protected:
241
242 #ifdef ASPOSE_GET_SHARED_MEMBERS
243 void GetSharedMembers(System::Object::shared_members_type& result) const override;
244 #endif
245
246 private:
247
249 static const int32_t ArraySetThreshold = 16;
250 int32_t _arraySetCount;
251 bool _useArraySet;
252 JsonDocument::PropertyNameSet::InlineRangeArray16 _arraySet;
253
254 void SwitchToHashSet(ReadOnlyMemory<uint8_t> utf8Json);
255
256 };
257
258 // SizeOrLength - offset - 0 - size - 4
259 // NumberOfRows - offset - 4 - size - 4
260 struct StackRow
261 {
262 public:
263
264 static const int32_t Size = 8;
265 int32_t SizeOrLength;
266 int32_t NumberOfRows;
267
268 StackRow(int32_t sizeOrLength = 0, int32_t numberOfRows = -1);
269
270 };
271
272 class StackRowStack : public IDisposable, public System::Details::BoxableObjectBase
273 {
274 typedef StackRowStack ThisType;
275 typedef IDisposable BaseType;
276
277 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
278 ASPOSECPP_SHARED_RTTI_INFO_DECL();
279
280 public:
281
282 ASPOSECPP_VALUE_TYPE_IMPLEMENTS_INTERFACES();
283
284 public:
285
286 StackRowStack(int32_t initialSize);
287
288 void Dispose() override;
289 void Push(JsonDocument::StackRow row);
290 JsonDocument::StackRow Pop();
291
292 StackRowStack();
293
294 protected:
295
296 #ifdef ASPOSE_GET_SHARED_MEMBERS
297 void GetSharedMembers(System::Object::shared_members_type& result) const override;
298 #endif
299
300 private:
301
303 int32_t _topOfStack;
304
305 void Enlarge();
306
307 };
308
309public:
310
311 ASPOSECPP_SHARED_API JsonElement get_RootElement();
312
313 ASPOSECPP_SHARED_API void Dispose() override;
314 ASPOSECPP_SHARED_API void WriteTo(System::SharedPtr<Utf8JsonWriter> writer);
315 static ASPOSECPP_SHARED_API System::SharedPtr<JsonDocument> Parse(ReadOnlyMemory<uint8_t> utf8Json, JsonDocumentOptions options = System::Default<System::Text::Json::JsonDocumentOptions>());
316 static ASPOSECPP_SHARED_API System::SharedPtr<JsonDocument> Parse(Buffers::ReadOnlySequence<uint8_t> utf8Json, JsonDocumentOptions options = System::Default<System::Text::Json::JsonDocumentOptions>());
317 static ASPOSECPP_SHARED_API System::SharedPtr<JsonDocument> Parse(System::SharedPtr<IO::Stream> utf8Json, JsonDocumentOptions options = System::Default<System::Text::Json::JsonDocumentOptions>());
318 static ASPOSECPP_SHARED_API System::SharedPtr<JsonDocument> Parse(ReadOnlyMemory<char16_t> json, JsonDocumentOptions options = System::Default<System::Text::Json::JsonDocumentOptions>());
319 static ASPOSECPP_SHARED_API System::SharedPtr<JsonDocument> Parse(String json, JsonDocumentOptions options = System::Default<System::Text::Json::JsonDocumentOptions>());
320 static ASPOSECPP_SHARED_API bool TryParseValue(Utf8JsonReader& reader, System::SharedPtr<JsonDocument>& document);
321 static ASPOSECPP_SHARED_API System::SharedPtr<JsonDocument> ParseValue(Utf8JsonReader& reader);
322 ASPOSECPP_SHARED_API virtual ~JsonDocument();
323
324protected:
325
326 ASPOSECPP_SHARED_API bool get_IsDisposable();
327
328 ASPOSECPP_SHARED_API JsonTokenType GetJsonTokenType(int32_t index);
329 ASPOSECPP_SHARED_API bool ValueIsEscaped(int32_t index, bool isPropertyName);
330 ASPOSECPP_SHARED_API int32_t GetArrayLength(int32_t index);
331 ASPOSECPP_SHARED_API int32_t GetPropertyCount(int32_t index);
332 ASPOSECPP_SHARED_API JsonElement GetArrayIndexElement(int32_t currentIndex, int32_t arrayIndex);
333 ASPOSECPP_SHARED_API int32_t GetEndIndex(int32_t index, bool includeEndElement);
335 ASPOSECPP_SHARED_API ReadOnlyMemory<uint8_t> GetRawValue(int32_t index, bool includeQuotes);
336 ASPOSECPP_SHARED_API String GetString(int32_t index, JsonTokenType expectedType);
337 ASPOSECPP_SHARED_API bool TextEquals(int32_t index, ReadOnlySpan<char16_t> otherText, bool isPropertyName);
338 ASPOSECPP_SHARED_API bool TextEquals(int32_t index, ReadOnlySpan<uint8_t> otherUtf8Text, bool isPropertyName, bool shouldUnescape);
339 ASPOSECPP_SHARED_API String GetNameOfPropertyValue(int32_t index);
340 ASPOSECPP_SHARED_API ReadOnlySpan<uint8_t> GetPropertyNameRaw(int32_t index);
341 ASPOSECPP_SHARED_API bool TryGetValue(int32_t index, System::SharedPtr<Array<uint8_t>>& value);
342 ASPOSECPP_SHARED_API bool TryGetValue(int32_t index, int8_t& value);
343 ASPOSECPP_SHARED_API bool TryGetValue(int32_t index, uint8_t& value);
344 ASPOSECPP_SHARED_API bool TryGetValue(int32_t index, int16_t& value);
345 ASPOSECPP_SHARED_API bool TryGetValue(int32_t index, uint16_t& value);
346 ASPOSECPP_SHARED_API bool TryGetValue(int32_t index, int32_t& value);
347 ASPOSECPP_SHARED_API bool TryGetValue(int32_t index, uint32_t& value);
348 ASPOSECPP_SHARED_API bool TryGetValue(int32_t index, int64_t& value);
349 ASPOSECPP_SHARED_API bool TryGetValue(int32_t index, uint64_t& value);
350 ASPOSECPP_SHARED_API bool TryGetValue(int32_t index, double& value);
351 ASPOSECPP_SHARED_API bool TryGetValue(int32_t index, float& value);
352 ASPOSECPP_SHARED_API bool TryGetValue(int32_t index, Decimal& value);
353 ASPOSECPP_SHARED_API bool TryGetValue(int32_t index, DateTime& value);
354 ASPOSECPP_SHARED_API bool TryGetValue(int32_t index, DateTimeOffset& value);
355 ASPOSECPP_SHARED_API bool TryGetValue(int32_t index, Guid& value);
356 ASPOSECPP_SHARED_API String GetRawValueAsString(int32_t index);
357 ASPOSECPP_SHARED_API String GetPropertyRawValueAsString(int32_t valueIndex);
358 ASPOSECPP_SHARED_API JsonElement CloneElement(int32_t index);
359 ASPOSECPP_SHARED_API void WriteElementTo(int32_t index, System::SharedPtr<Utf8JsonWriter> writer);
360 ASPOSECPP_SHARED_API void WritePropertyName(int32_t index, System::SharedPtr<Utf8JsonWriter> writer);
361 static ASPOSECPP_SHARED_API System::SharedPtr<JsonDocument> ParseRented(System::SharedPtr<PooledByteBufferWriter> utf8Json, JsonDocumentOptions options = System::Default<System::Text::Json::JsonDocumentOptions>());
364 static ASPOSECPP_SHARED_API System::SharedPtr<JsonDocument> ParseValue(String json, JsonDocumentOptions options);
366 static ASPOSECPP_SHARED_API System::SharedPtr<JsonDocument> ParseValue(Utf8JsonReader& reader, bool allowDuplicateProperties);
367 static ASPOSECPP_SHARED_API bool TryParseValue(Utf8JsonReader& reader, System::SharedPtr<JsonDocument>& document, bool shouldThrow, bool useArrayPools, bool allowDuplicateProperties = true);
368 ASPOSECPP_SHARED_API bool TryGetNamedPropertyValue(int32_t index, ReadOnlySpan<char16_t> propertyName, JsonElement& value);
369 ASPOSECPP_SHARED_API bool TryGetNamedPropertyValue(int32_t index, ReadOnlySpan<uint8_t> propertyName, JsonElement& value);
370
371 #ifdef ASPOSE_GET_SHARED_MEMBERS
372 ASPOSECPP_SHARED_API void GetSharedMembers(System::Object::shared_members_type& result) const override;
373 #endif
374
375private:
376
377 ReadOnlyMemory<uint8_t> _utf8Json;
378 JsonDocument::MetadataDb _parsedData;
379 System::SharedPtr<Array<uint8_t>> _extraRentedArrayPoolBytes;
380 System::SharedPtr<PooledByteBufferWriter> _extraPooledByteBufferWriter;
381 bool pr_IsDisposable;
382 static System::SharedPtr<JsonDocument> s_nullLiteral;
383 static System::SharedPtr<JsonDocument> s_trueLiteral;
384 static System::SharedPtr<JsonDocument> s_falseLiteral;
385 static const int32_t UnseekableStreamInitialRentSize = 4096;
386
387 ASPOSECPP_SHARED_API JsonDocument(ReadOnlyMemory<uint8_t> utf8Json, JsonDocument::MetadataDb parsedData, System::SharedPtr<Array<uint8_t>> extraRentedArrayPoolBytes = nullptr, System::SharedPtr<PooledByteBufferWriter> extraPooledByteBufferWriter = nullptr, bool isDisposable = true);
388
389 MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(JsonDocument, CODEPORTING_ARGS(ReadOnlyMemory<uint8_t> utf8Json, JsonDocument::MetadataDb parsedData, System::SharedPtr<Array<uint8_t>> extraRentedArrayPoolBytes = nullptr, System::SharedPtr<PooledByteBufferWriter> extraPooledByteBufferWriter = nullptr, bool isDisposable = true));
390
391 ASPOSECPP_SHARED_API ReadOnlyMemory<uint8_t> GetPropertyRawValue(int32_t valueIndex);
392 ASPOSECPP_SHARED_API void WriteComplexElement(int32_t index, System::SharedPtr<Utf8JsonWriter> writer);
393 ASPOSECPP_SHARED_API ReadOnlySpan<uint8_t> UnescapeString(const JsonDocument::DbRow& row, ArraySegment<uint8_t>& rented);
394 static ASPOSECPP_SHARED_API void ClearAndReturn(ArraySegment<uint8_t> rented);
395 ASPOSECPP_SHARED_API void WritePropertyName(const JsonDocument::DbRow& row, System::SharedPtr<Utf8JsonWriter> writer);
396 ASPOSECPP_SHARED_API void WriteString(const JsonDocument::DbRow& row, System::SharedPtr<Utf8JsonWriter> writer);
397 static ASPOSECPP_SHARED_API void Parse(ReadOnlySpan<uint8_t> utf8JsonSpan, JsonReaderOptions readerOptions, JsonDocument::MetadataDb& database, JsonDocument::StackRowStack& stack);
398 static ASPOSECPP_SHARED_API void ValidateNoDuplicateProperties(System::SharedPtr<JsonDocument> document);
399 static ASPOSECPP_SHARED_API void ValidateDuplicatePropertiesCore(System::SharedPtr<JsonDocument> document);
400 ASPOSECPP_SHARED_API void CheckNotDisposed();
401 static ASPOSECPP_SHARED_API void CheckExpectedType(JsonTokenType expected, JsonTokenType actual);
402 static ASPOSECPP_SHARED_API void CheckSupportedOptions(JsonReaderOptions readerOptions, String paramName);
403 static ASPOSECPP_SHARED_API System::SharedPtr<JsonDocument> CreateForLiteral(JsonTokenType tokenType);
404 static ASPOSECPP_SHARED_API System::SharedPtr<JsonDocument> Parse(ReadOnlyMemory<uint8_t> utf8Json, JsonReaderOptions readerOptions, System::SharedPtr<Array<uint8_t>> extraRentedArrayPoolBytes = nullptr, System::SharedPtr<PooledByteBufferWriter> extraPooledByteBufferWriter = nullptr, bool allowDuplicateProperties = true);
405 static ASPOSECPP_SHARED_API System::SharedPtr<JsonDocument> ParseUnrented(ReadOnlyMemory<uint8_t> utf8Json, JsonReaderOptions readerOptions, JsonTokenType tokenType = System::Text::Json::JsonTokenType::None, bool allowDuplicateProperties = true);
406 static ASPOSECPP_SHARED_API ArraySegment<uint8_t> ReadToEnd(System::SharedPtr<IO::Stream> stream);
407 ASPOSECPP_SHARED_API bool TryGetNamedPropertyValue(int32_t startIndex, int32_t endIndex, ReadOnlySpan<uint8_t> propertyName, JsonElement& value);
408
409};
410
411} // namespace Json
412} // namespace Text
413} // namespace System
Class that represents an array data structure. Objects of this class should only be allocated using S...
Definition: array.h:296
Represents a segment of the one-dimensional array. This type should be allocated on stack and passed ...
Definition: array_segment.h:62
Interface providing means to compare two objects for equality. Objects of this class should only be a...
Definition: iequality_comparer.h:18
Represents a specific date and time value on the time continuum. This type should be allocated on sta...
Definition: date_time.h:50
Contains the date and time of day relative to Coordinated Universal Time. Objects of this class shoul...
Definition: date_time_offset.h:16
Represents a decimal number. This type should be allocated on stack and passed to functions by value ...
Definition: decimal.h:107
Represents a Globally Unique IDentifier This type should be allocated on stack and passed to function...
Definition: guid.h:34
Defines method that releases resources owned by the current object. Objects of this class should only...
Definition: idisposable.h:30
Base class that enables using methods available for System.Object class in C#. All non-trivial classe...
Definition: object.h:51
Forward to use within Span class.
Definition: span.h:415
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
String class used across the library. Is a substitute for C# System.String when translating code....
Definition: string.h:126
Definition: json_document.h:71
static System::SharedPtr< JsonDocument > Parse(System::SharedPtr< IO::Stream > utf8Json, JsonDocumentOptions options=System::Default< System::Text::Json::JsonDocumentOptions >())
JsonTokenType GetJsonTokenType(int32_t index)
static System::SharedPtr< JsonDocument > Parse(ReadOnlyMemory< uint8_t > utf8Json, JsonDocumentOptions options=System::Default< System::Text::Json::JsonDocumentOptions >())
static System::SharedPtr< JsonDocument > ParseValue(Utf8JsonReader &reader, bool allowDuplicateProperties)
bool TryGetValue(int32_t index, int16_t &value)
void WriteElementTo(int32_t index, System::SharedPtr< Utf8JsonWriter > writer)
bool TryGetValue(int32_t index, int8_t &value)
bool TryGetNamedPropertyValue(int32_t index, ReadOnlySpan< char16_t > propertyName, JsonElement &value)
JsonElement CloneElement(int32_t index)
bool ValueIsEscaped(int32_t index, bool isPropertyName)
String GetNameOfPropertyValue(int32_t index)
ReadOnlySpan< uint8_t > GetPropertyNameRaw(int32_t index)
bool TryGetValue(int32_t index, DateTime &value)
String GetPropertyRawValueAsString(int32_t valueIndex)
String GetString(int32_t index, JsonTokenType expectedType)
bool TryGetValue(int32_t index, int32_t &value)
bool TryGetValue(int32_t index, int64_t &value)
static System::SharedPtr< JsonDocument > ParseValue(String json, JsonDocumentOptions options)
String GetRawValueAsString(int32_t index)
bool TryGetValue(int32_t index, double &value)
static System::SharedPtr< JsonDocument > ParseValue(ReadOnlySpan< uint8_t > utf8Json, JsonDocumentOptions options)
static System::SharedPtr< JsonDocument > Parse(String json, JsonDocumentOptions options=System::Default< System::Text::Json::JsonDocumentOptions >())
static System::SharedPtr< JsonDocument > ParseRented(System::SharedPtr< PooledByteBufferWriter > utf8Json, JsonDocumentOptions options=System::Default< System::Text::Json::JsonDocumentOptions >())
bool TextEquals(int32_t index, ReadOnlySpan< char16_t > otherText, bool isPropertyName)
void Dispose() override
Does nothing.
void WritePropertyName(int32_t index, System::SharedPtr< Utf8JsonWriter > writer)
void WriteTo(System::SharedPtr< Utf8JsonWriter > writer)
ReadOnlyMemory< uint8_t > GetRawValue(int32_t index, bool includeQuotes)
bool TryGetValue(int32_t index, uint16_t &value)
int32_t GetArrayLength(int32_t index)
JsonElement GetArrayIndexElement(int32_t currentIndex, int32_t arrayIndex)
static bool TryParseValue(Utf8JsonReader &reader, System::SharedPtr< JsonDocument > &document, bool shouldThrow, bool useArrayPools, bool allowDuplicateProperties=true)
bool TryGetValue(int32_t index, System::SharedPtr< Array< uint8_t > > &value)
int32_t GetPropertyCount(int32_t index)
bool TryGetNamedPropertyValue(int32_t index, ReadOnlySpan< uint8_t > propertyName, JsonElement &value)
bool TryGetValue(int32_t index, uint32_t &value)
bool TryGetValue(int32_t index, uint8_t &value)
bool TryGetValue(int32_t index, float &value)
static System::SharedPtr< JsonDocument > Parse(ReadOnlyMemory< char16_t > json, JsonDocumentOptions options=System::Default< System::Text::Json::JsonDocumentOptions >())
bool TryGetValue(int32_t index, uint64_t &value)
static System::SharedPtr< JsonDocument > ParseValue(Utf8JsonReader &reader)
bool TryGetValue(int32_t index, Decimal &value)
bool TextEquals(int32_t index, ReadOnlySpan< uint8_t > otherUtf8Text, bool isPropertyName, bool shouldUnescape)
static System::SharedPtr< JsonDocument > ParseValue(ReadOnlySpan< char16_t > json, JsonDocumentOptions options)
bool TryGetValue(int32_t index, Guid &value)
static System::SharedPtr< JsonDocument > Parse(Buffers::ReadOnlySequence< uint8_t > utf8Json, JsonDocumentOptions options=System::Default< System::Text::Json::JsonDocumentOptions >())
ReadOnlyMemory< uint8_t > GetRootRawValue()
bool TryGetValue(int32_t index, DateTimeOffset &value)
static System::SharedPtr< JsonDocument > ParseValue(System::SharedPtr< IO::Stream > utf8Json, JsonDocumentOptions options)
int32_t GetEndIndex(int32_t index, bool includeEndElement)
static bool TryParseValue(Utf8JsonReader &reader, System::SharedPtr< JsonDocument > &document)
Definition: json_document_options.h:26
Definition: json_element.h:59
Definition: json_property.h:30
Definition: json_reader_options.h:26
Definition: json_serializer_helpers.h:91
Definition: json_node.h:54
Definition: pooled_byte_buffer_writer.h:32
Definition: utf8_json_reader.h:78
Definition: utf8_json_writer.h:81
@ Text
Defines color adjustment information for text.
@ Stream
The type that supports reliable, two-way, connection-based byte streams without duplication of data a...
JsonTokenType
Definition: json_token_type.h:12
Definition: db_command.h:9
bool Equals(const TA &a, const TB &b)
Determines the equality of two values applying operator==() to them.
Definition: primitive_types.h:77
auto & Get(T &collection, const Index &index)
Implementation for collection[index] expressions.
Definition: index.h:98
std::enable_if< std::is_scalar< T >::value, int >::type GetHashCode(const T &obj)
Returns a hash code for the specified scalar value.
Definition: get_hash_code.h:21
Definition: json_document.h:86
DbRow(JsonTokenType jsonTokenType, int32_t location, int32_t sizeOrLength)