CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
utf8_json_writer.h
1#pragma once
2
3#include <system/span.h>
4#include <system/idisposable.h>
5#include <system/default.h>
6#include <system/array.h>
7#include <system/memory.h>
8#include <cstdint>
9
10#include "system/text/json/json_token_type.h"
11#include "system/text/json/writer/json_writer_options.h"
12#include "system/text/json/json_bit_stack.h"
13
14namespace System
15{
16namespace Buffers
17{
18template <typename> class ArrayBufferWriter;
19template <typename> class IBufferWriter;
20template <typename> class ReadOnlySequence;
21} // namespace Buffers
22class DateTime;
23class DateTimeOffset;
24class Decimal;
25class Guid;
26namespace IO
27{
28class Stream;
29} // namespace IO
30namespace Text
31{
32namespace Json
33{
34enum class ExceptionResource;
35class JsonDocument;
36class JsonEncodedText;
37namespace Nodes
38{
39class JsonValueOfJsonNumber;
40} // namespace Nodes
41namespace Serialization
42{
43namespace Converters
44{
45class BooleanConverter;
46class ByteConverter;
47class DateTimeConverter;
48class DateTimeOffsetConverter;
49class DecimalConverter;
50class DoubleConverter;
51template <typename> class EnumConverter;
52class GuidConverter;
53class Int16Converter;
54class Int32Converter;
55class Int64Converter;
56class SByteConverter;
57class SingleConverter;
58class UInt16Converter;
59class UInt32Converter;
60class UInt64Converter;
61} // namespace Converters
62template <typename> class JsonConverter;
63namespace Metadata
64{
65template <typename> class JsonPropertyInfo;
66} // namespace Metadata
67} // namespace Serialization
68class ThrowHelper;
69class Utf8JsonWriterCache;
70} // namespace Json
71} // namespace Text
72} // namespace System
73
74namespace System {
75
76namespace Text {
77
78namespace Json {
79
80class ASPOSECPP_SHARED_CLASS Utf8JsonWriter final : public IDisposable
81{
83 typedef IDisposable BaseType;
84
85 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
86 ASPOSECPP_SHARED_RTTI_INFO_DECL();
87
88 friend class JsonDocument;
105 friend class ThrowHelper;
108 template<typename FT0> friend class System::Text::Json::Serialization::JsonConverter;
110
111protected:
112
113 enum class EnclosingContainerType : uint8_t
114 {
115 None = static_cast<uint8_t>(System::Text::Json::JsonTokenType::None),
117 Array = static_cast<uint8_t>(0x10),
118 Utf8StringSequence = static_cast<uint8_t>(0x20),
119 Utf16StringSequence = static_cast<uint8_t>(0x30),
120 Base64StringSequence = static_cast<uint8_t>(0x40)
121 };
122
123private:
124
125 class Inline3ByteArray : public System::Object, public System::Details::BoxableObjectBase
126 {
127 typedef Inline3ByteArray ThisType;
128 typedef System::Object BaseType;
129
130 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
131 RTTI_INFO_DECL();
132
133 public:
134
135 uint8_t byte0;
136 uint8_t byte1;
137 uint8_t byte2;
138
139 Inline3ByteArray();
140
141 };
142
143public:
144
145 ASPOSECPP_SHARED_API int32_t get_BytesPending();
146 ASPOSECPP_SHARED_API int64_t get_BytesCommitted();
147 ASPOSECPP_SHARED_API JsonWriterOptions get_Options();
148 ASPOSECPP_SHARED_API int32_t get_CurrentDepth();
149
150 ASPOSECPP_SHARED_API Utf8JsonWriter(System::SharedPtr<Buffers::IBufferWriter<uint8_t>> bufferWriter, JsonWriterOptions options = System::Default<System::Text::Json::JsonWriterOptions>());
151 ASPOSECPP_SHARED_API Utf8JsonWriter(System::SharedPtr<IO::Stream> utf8Json, JsonWriterOptions options = System::Default<System::Text::Json::JsonWriterOptions>());
152
153 ASPOSECPP_SHARED_API void Reset();
154 ASPOSECPP_SHARED_API void Reset(System::SharedPtr<IO::Stream> utf8Json);
155 ASPOSECPP_SHARED_API void Reset(System::SharedPtr<IO::Stream> utf8Json, JsonWriterOptions options);
156 ASPOSECPP_SHARED_API void Reset(System::SharedPtr<Buffers::IBufferWriter<uint8_t>> bufferWriter);
157 ASPOSECPP_SHARED_API void Reset(System::SharedPtr<Buffers::IBufferWriter<uint8_t>> bufferWriter, JsonWriterOptions options);
158 ASPOSECPP_SHARED_API void Flush();
159 ASPOSECPP_SHARED_API void Dispose() override;
160 ASPOSECPP_SHARED_API void WriteStartArray();
161 ASPOSECPP_SHARED_API void WriteStartObject();
162 ASPOSECPP_SHARED_API void WriteStartArray(JsonEncodedText propertyName);
163 ASPOSECPP_SHARED_API void WriteStartObject(JsonEncodedText propertyName);
164 ASPOSECPP_SHARED_API void WriteStartArray(ReadOnlySpan<uint8_t> utf8PropertyName);
165 ASPOSECPP_SHARED_API void WriteStartObject(ReadOnlySpan<uint8_t> utf8PropertyName);
166 ASPOSECPP_SHARED_API void WriteStartArray(String propertyName);
167 ASPOSECPP_SHARED_API void WriteStartObject(String propertyName);
168 ASPOSECPP_SHARED_API void WriteStartArray(ReadOnlySpan<char16_t> propertyName);
169 ASPOSECPP_SHARED_API void WriteStartObject(ReadOnlySpan<char16_t> propertyName);
170 ASPOSECPP_SHARED_API void WriteEndArray();
171 ASPOSECPP_SHARED_API void WriteEndObject();
172 ASPOSECPP_SHARED_API void WriteBase64String(JsonEncodedText propertyName, ReadOnlySpan<uint8_t> bytes);
173 ASPOSECPP_SHARED_API void WriteBase64String(String propertyName, ReadOnlySpan<uint8_t> bytes);
174 ASPOSECPP_SHARED_API void WriteBase64String(ReadOnlySpan<char16_t> propertyName, ReadOnlySpan<uint8_t> bytes);
175 ASPOSECPP_SHARED_API void WriteBase64String(ReadOnlySpan<uint8_t> utf8PropertyName, ReadOnlySpan<uint8_t> bytes);
176 ASPOSECPP_SHARED_API void WriteString(JsonEncodedText propertyName, DateTime value);
177 ASPOSECPP_SHARED_API void WriteString(String propertyName, DateTime value);
178 ASPOSECPP_SHARED_API void WriteString(ReadOnlySpan<char16_t> propertyName, DateTime value);
179 ASPOSECPP_SHARED_API void WriteString(ReadOnlySpan<uint8_t> utf8PropertyName, DateTime value);
180 ASPOSECPP_SHARED_API void WriteString(JsonEncodedText propertyName, DateTimeOffset value);
181 ASPOSECPP_SHARED_API void WriteString(String propertyName, DateTimeOffset value);
182 ASPOSECPP_SHARED_API void WriteString(ReadOnlySpan<char16_t> propertyName, DateTimeOffset value);
183 ASPOSECPP_SHARED_API void WriteString(ReadOnlySpan<uint8_t> utf8PropertyName, DateTimeOffset value);
184 ASPOSECPP_SHARED_API void WriteNumber(JsonEncodedText propertyName, Decimal value);
185 ASPOSECPP_SHARED_API void WriteNumber(String propertyName, Decimal value);
186 ASPOSECPP_SHARED_API void WriteNumber(ReadOnlySpan<char16_t> propertyName, Decimal value);
187 ASPOSECPP_SHARED_API void WriteNumber(ReadOnlySpan<uint8_t> utf8PropertyName, Decimal value);
188 ASPOSECPP_SHARED_API void WriteNumber(JsonEncodedText propertyName, double value);
189 ASPOSECPP_SHARED_API void WriteNumber(String propertyName, double value);
190 ASPOSECPP_SHARED_API void WriteNumber(ReadOnlySpan<char16_t> propertyName, double value);
191 ASPOSECPP_SHARED_API void WriteNumber(ReadOnlySpan<uint8_t> utf8PropertyName, double value);
192 ASPOSECPP_SHARED_API void WriteNumber(JsonEncodedText propertyName, float value);
193 ASPOSECPP_SHARED_API void WriteNumber(String propertyName, float value);
194 ASPOSECPP_SHARED_API void WriteNumber(ReadOnlySpan<char16_t> propertyName, float value);
195 ASPOSECPP_SHARED_API void WriteNumber(ReadOnlySpan<uint8_t> utf8PropertyName, float value);
196 ASPOSECPP_SHARED_API void WriteString(JsonEncodedText propertyName, Guid value);
197 ASPOSECPP_SHARED_API void WriteString(String propertyName, Guid value);
198 ASPOSECPP_SHARED_API void WriteString(ReadOnlySpan<char16_t> propertyName, Guid value);
199 ASPOSECPP_SHARED_API void WriteString(ReadOnlySpan<uint8_t> utf8PropertyName, Guid value);
200 ASPOSECPP_SHARED_API void WriteNull(JsonEncodedText propertyName);
201 ASPOSECPP_SHARED_API void WriteNull(String propertyName);
202 ASPOSECPP_SHARED_API void WriteNull(ReadOnlySpan<char16_t> propertyName);
203 ASPOSECPP_SHARED_API void WriteNull(ReadOnlySpan<uint8_t> utf8PropertyName);
204 ASPOSECPP_SHARED_API void WriteBoolean(JsonEncodedText propertyName, bool value);
205 ASPOSECPP_SHARED_API void WriteBoolean(String propertyName, bool value);
206 ASPOSECPP_SHARED_API void WriteBoolean(ReadOnlySpan<char16_t> propertyName, bool value);
207 ASPOSECPP_SHARED_API void WriteBoolean(ReadOnlySpan<uint8_t> utf8PropertyName, bool value);
208 ASPOSECPP_SHARED_API void WriteNumber(JsonEncodedText propertyName, int64_t value);
209 ASPOSECPP_SHARED_API void WriteNumber(String propertyName, int64_t value);
210 ASPOSECPP_SHARED_API void WriteNumber(ReadOnlySpan<char16_t> propertyName, int64_t value);
211 ASPOSECPP_SHARED_API void WriteNumber(ReadOnlySpan<uint8_t> utf8PropertyName, int64_t value);
212 ASPOSECPP_SHARED_API void WriteNumber(JsonEncodedText propertyName, int32_t value);
213 ASPOSECPP_SHARED_API void WriteNumber(String propertyName, int32_t value);
214 ASPOSECPP_SHARED_API void WriteNumber(ReadOnlySpan<char16_t> propertyName, int32_t value);
215 ASPOSECPP_SHARED_API void WriteNumber(ReadOnlySpan<uint8_t> utf8PropertyName, int32_t value);
216 ASPOSECPP_SHARED_API void WritePropertyName(JsonEncodedText propertyName);
217 ASPOSECPP_SHARED_API void WritePropertyName(String propertyName);
218 ASPOSECPP_SHARED_API void WritePropertyName(const char16_t* propertyName);
219 ASPOSECPP_SHARED_API void WritePropertyName(ReadOnlySpan<char16_t> propertyName);
220 ASPOSECPP_SHARED_API void WritePropertyName(ReadOnlySpan<uint8_t> utf8PropertyName);
221 ASPOSECPP_SHARED_API void WriteString(JsonEncodedText propertyName, JsonEncodedText value);
222 ASPOSECPP_SHARED_API void WriteString(String propertyName, JsonEncodedText value);
223 ASPOSECPP_SHARED_API void WriteString(String propertyName, String value);
224 ASPOSECPP_SHARED_API void WriteString(ReadOnlySpan<char16_t> propertyName, ReadOnlySpan<char16_t> value);
225 ASPOSECPP_SHARED_API void WriteString(ReadOnlySpan<uint8_t> utf8PropertyName, ReadOnlySpan<uint8_t> utf8Value);
226 ASPOSECPP_SHARED_API void WriteString(JsonEncodedText propertyName, String value);
227 ASPOSECPP_SHARED_API void WriteString(JsonEncodedText propertyName, ReadOnlySpan<char16_t> value);
228 ASPOSECPP_SHARED_API void WriteString(String propertyName, ReadOnlySpan<char16_t> value);
229 ASPOSECPP_SHARED_API void WriteString(ReadOnlySpan<uint8_t> utf8PropertyName, ReadOnlySpan<char16_t> value);
230 ASPOSECPP_SHARED_API void WriteString(JsonEncodedText propertyName, ReadOnlySpan<uint8_t> utf8Value);
231 ASPOSECPP_SHARED_API void WriteString(String propertyName, ReadOnlySpan<uint8_t> utf8Value);
232 ASPOSECPP_SHARED_API void WriteString(ReadOnlySpan<char16_t> propertyName, ReadOnlySpan<uint8_t> utf8Value);
233 ASPOSECPP_SHARED_API void WriteString(ReadOnlySpan<char16_t> propertyName, JsonEncodedText value);
234 ASPOSECPP_SHARED_API void WriteString(ReadOnlySpan<char16_t> propertyName, String value);
235 ASPOSECPP_SHARED_API void WriteString(ReadOnlySpan<uint8_t> utf8PropertyName, JsonEncodedText value);
236 ASPOSECPP_SHARED_API void WriteString(ReadOnlySpan<uint8_t> utf8PropertyName, String value);
237 ASPOSECPP_SHARED_API void WriteNumber(JsonEncodedText propertyName, uint64_t value);
238 ASPOSECPP_SHARED_API void WriteNumber(String propertyName, uint64_t value);
239 ASPOSECPP_SHARED_API void WriteNumber(ReadOnlySpan<char16_t> propertyName, uint64_t value);
240 ASPOSECPP_SHARED_API void WriteNumber(ReadOnlySpan<uint8_t> utf8PropertyName, uint64_t value);
241 ASPOSECPP_SHARED_API void WriteNumber(JsonEncodedText propertyName, uint32_t value);
242 ASPOSECPP_SHARED_API void WriteNumber(String propertyName, uint32_t value);
243 ASPOSECPP_SHARED_API void WriteNumber(ReadOnlySpan<char16_t> propertyName, uint32_t value);
244 ASPOSECPP_SHARED_API void WriteNumber(ReadOnlySpan<uint8_t> utf8PropertyName, uint32_t value);
245 ASPOSECPP_SHARED_API void WriteBase64StringValue(ReadOnlySpan<uint8_t> bytes);
246 ASPOSECPP_SHARED_API void WriteStringValue(DateTime value);
247 ASPOSECPP_SHARED_API void WriteStringValue(DateTimeOffset value);
248 ASPOSECPP_SHARED_API void WriteNumberValue(Decimal value);
249 ASPOSECPP_SHARED_API void WriteNumberValue(double value);
250 ASPOSECPP_SHARED_API void WriteNumberValue(float value);
251 ASPOSECPP_SHARED_API void WriteStringValue(Guid value);
252 ASPOSECPP_SHARED_API void WriteNullValue();
253 ASPOSECPP_SHARED_API void WriteBooleanValue(bool value);
254 ASPOSECPP_SHARED_API void WriteRawValue(String json, bool skipInputValidation = false);
255 ASPOSECPP_SHARED_API void WriteRawValue(ReadOnlySpan<char16_t> json, bool skipInputValidation = false);
256 ASPOSECPP_SHARED_API void WriteRawValue(ReadOnlySpan<uint8_t> utf8Json, bool skipInputValidation = false);
257 ASPOSECPP_SHARED_API void WriteRawValue(Buffers::ReadOnlySequence<uint8_t> utf8Json, bool skipInputValidation = false);
258 ASPOSECPP_SHARED_API void WriteNumberValue(int32_t value);
259 ASPOSECPP_SHARED_API void WriteNumberValue(int64_t value);
260 ASPOSECPP_SHARED_API void WriteStringValue(JsonEncodedText value);
261 ASPOSECPP_SHARED_API void WriteStringValue(String value);
262 ASPOSECPP_SHARED_API void WriteStringValue(ReadOnlySpan<char16_t> value);
263 ASPOSECPP_SHARED_API void WriteStringValue(ReadOnlySpan<uint8_t> utf8Value);
264 ASPOSECPP_SHARED_API void WriteStringValueSegment(ReadOnlySpan<char16_t> value, bool isFinalSegment);
265 ASPOSECPP_SHARED_API void WriteStringValueSegment(ReadOnlySpan<uint8_t> value, bool isFinalSegment);
266 ASPOSECPP_SHARED_API void WriteBase64StringSegment(ReadOnlySpan<uint8_t> value, bool isFinalSegment);
267 ASPOSECPP_SHARED_API void WriteNumberValue(uint32_t value);
268 ASPOSECPP_SHARED_API void WriteNumberValue(uint64_t value);
269
270protected:
271
272 ASPOSECPP_SHARED_API JsonTokenType get_TokenType();
273
274 ASPOSECPP_SHARED_API void ResetAllStateForCacheReuse();
277 ASPOSECPP_SHARED_API void WritePropertyName(DateTime value);
278 ASPOSECPP_SHARED_API void WritePropertyName(DateTimeOffset value);
279 ASPOSECPP_SHARED_API void WritePropertyName(Decimal value);
280 ASPOSECPP_SHARED_API void WritePropertyName(double value);
281 ASPOSECPP_SHARED_API void WritePropertyName(float value);
282 ASPOSECPP_SHARED_API void WriteNumber(ReadOnlySpan<char16_t> propertyName, ReadOnlySpan<uint8_t> utf8FormattedNumber);
283 ASPOSECPP_SHARED_API void WriteNumber(ReadOnlySpan<uint8_t> utf8PropertyName, ReadOnlySpan<uint8_t> utf8FormattedNumber);
284 ASPOSECPP_SHARED_API void WriteNumber(JsonEncodedText propertyName, ReadOnlySpan<uint8_t> utf8FormattedNumber);
285 ASPOSECPP_SHARED_API void WritePropertyName(Guid value);
286 ASPOSECPP_SHARED_API void WriteNullSection(ReadOnlySpan<uint8_t> escapedPropertyNameSection);
287 ASPOSECPP_SHARED_API void WritePropertyName(bool value);
288 ASPOSECPP_SHARED_API void WritePropertyName(int32_t value);
289 ASPOSECPP_SHARED_API void WritePropertyName(int64_t value);
290 ASPOSECPP_SHARED_API void WritePropertyNameSection(ReadOnlySpan<uint8_t> escapedPropertyNameSection);
291 ASPOSECPP_SHARED_API void WritePropertyName(uint32_t value);
292 ASPOSECPP_SHARED_API void WritePropertyName(uint64_t value);
293 ASPOSECPP_SHARED_API void WriteNumberValueAsString(Decimal value);
294 ASPOSECPP_SHARED_API void WriteNumberValueAsString(double value);
295 ASPOSECPP_SHARED_API void WriteFloatingPointConstant(double value);
296 ASPOSECPP_SHARED_API void WriteNumberValueAsString(float value);
297 ASPOSECPP_SHARED_API void WriteFloatingPointConstant(float value);
298 ASPOSECPP_SHARED_API void WriteNumberValue(ReadOnlySpan<uint8_t> utf8FormattedNumber);
299 ASPOSECPP_SHARED_API void WriteNumberValueAsString(int64_t value);
300 ASPOSECPP_SHARED_API void WriteNumberValueAsStringUnescaped(ReadOnlySpan<uint8_t> utf8Value);
301 ASPOSECPP_SHARED_API void WriteNumberValueAsString(uint64_t value);
302 #ifdef ASPOSE_GET_SHARED_MEMBERS
303 void GetSharedMembers(System::Object::shared_members_type& result) const override;
304 #endif
305
306private:
307
308 static const int32_t DefaultGrowthSize = 4096;
309 static const int32_t InitialGrowthSize = 256;
313 Memory<uint8_t> _memory;
314 Utf8JsonWriter::EnclosingContainerType _enclosingContainer;
315 JsonTokenType _tokenType;
316 BitStack _bitStack;
317 Utf8JsonWriter::Inline3ByteArray _partialStringData;
318
319 Span<uint8_t> get_PartialStringDataRaw();
320
321 uint8_t _partialStringDataLength;
322 int32_t _currentDepth;
323 JsonWriterOptions _options;
324 uint8_t _indentByte;
325 int32_t _indentLength;
326 int32_t _newLineLength;
327 int32_t pr_BytesPending;
328
329 void set_BytesPending(int32_t value);
330
331 int64_t pr_BytesCommitted;
332
333 void set_BytesCommitted(int64_t value);
334 int32_t get_Indentation();
335 ReadOnlySpan<uint8_t> get_PartialUtf8StringData();
336 void set_PartialUtf8StringData(ReadOnlySpan<uint8_t> value);
337 ReadOnlySpan<char16_t> get_PartialUtf16StringData();
338 void set_PartialUtf16StringData(ReadOnlySpan<char16_t> value);
339 ReadOnlySpan<uint8_t> get_PartialBase64StringData();
340 void set_PartialBase64StringData(ReadOnlySpan<uint8_t> value);
341 String get_DebuggerDisplay();
342 bool get_IsWritingPartialString();
343
344 bool get_CanWriteValue();
345 bool get_HasPartialStringData();
346
348
349 MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(Utf8JsonWriter, CODEPORTING_ARGS());
350
351 void SetOptions(JsonWriterOptions options);
352 void ResetHelper();
353 void CheckNotDisposed();
354 void WriteStart(uint8_t token);
355 void WriteStartMinimized(uint8_t token);
356 void WriteStartSlow(uint8_t token);
357 void ValidateStart();
358 void OnValidateStartFailed();
359 void WriteStartIndented(uint8_t token);
360 void WriteStartHelper(ReadOnlySpan<uint8_t> utf8PropertyName, uint8_t token);
361 void WriteStartEscape(ReadOnlySpan<uint8_t> utf8PropertyName, uint8_t token);
362 void WriteStartByOptions(ReadOnlySpan<uint8_t> utf8PropertyName, uint8_t token);
363 void WriteStartEscapeProperty(ReadOnlySpan<uint8_t> utf8PropertyName, uint8_t token, int32_t firstEscapeIndexProp);
364 void WriteStartEscape(ReadOnlySpan<char16_t> propertyName, uint8_t token);
365 void WriteStartByOptions(ReadOnlySpan<char16_t> propertyName, uint8_t token);
366 void WriteStartEscapeProperty(ReadOnlySpan<char16_t> propertyName, uint8_t token, int32_t firstEscapeIndexProp);
367 void WriteEnd(uint8_t token);
368 void WriteEndMinimized(uint8_t token);
369 void WriteEndSlow(uint8_t token);
370 void ValidateEnd(uint8_t token);
371 void WriteEndIndented(uint8_t token);
372 void WriteNewLine(Span<uint8_t> output);
373 void WriteIndentation(Span<uint8_t> buffer, int32_t indent);
374 void UpdateBitStackOnStart(uint8_t token);
375 void Grow(int32_t requiredSize);
376 void FirstCallToGetMemory(int32_t requiredSize);
377 void SetFlagToAddListSeparatorBeforeNextItem();
378 void ThrowInvalidOperationException(ExceptionResource resource);
379 void ThrowInvalidOperationException_MismatchedObjectArray(uint8_t token);
380 void ThrowInvalidOperationException_DepthTooLarge();
381 void WriteBase64Escape(ReadOnlySpan<char16_t> propertyName, ReadOnlySpan<uint8_t> bytes);
382 void WriteBase64Escape(ReadOnlySpan<uint8_t> utf8PropertyName, ReadOnlySpan<uint8_t> bytes);
383 void WriteBase64EscapeProperty(ReadOnlySpan<char16_t> propertyName, ReadOnlySpan<uint8_t> bytes, int32_t firstEscapeIndexProp);
384 void WriteBase64EscapeProperty(ReadOnlySpan<uint8_t> utf8PropertyName, ReadOnlySpan<uint8_t> bytes, int32_t firstEscapeIndexProp);
385 void WriteBase64ByOptions(ReadOnlySpan<char16_t> propertyName, ReadOnlySpan<uint8_t> bytes);
386 void WriteBase64ByOptions(ReadOnlySpan<uint8_t> utf8PropertyName, ReadOnlySpan<uint8_t> bytes);
387 void WriteBase64Minimized(ReadOnlySpan<char16_t> escapedPropertyName, ReadOnlySpan<uint8_t> bytes);
388 void WriteBase64Minimized(ReadOnlySpan<uint8_t> escapedPropertyName, ReadOnlySpan<uint8_t> bytes);
389 void WriteBase64Indented(ReadOnlySpan<char16_t> escapedPropertyName, ReadOnlySpan<uint8_t> bytes);
390 void WriteBase64Indented(ReadOnlySpan<uint8_t> escapedPropertyName, ReadOnlySpan<uint8_t> bytes);
391 void WriteStringEscape(ReadOnlySpan<char16_t> propertyName, DateTime value);
392 void WriteStringEscape(ReadOnlySpan<uint8_t> utf8PropertyName, DateTime value);
393 void WriteStringEscapeProperty(ReadOnlySpan<char16_t> propertyName, DateTime value, int32_t firstEscapeIndexProp);
394 void WriteStringEscapeProperty(ReadOnlySpan<uint8_t> utf8PropertyName, DateTime value, int32_t firstEscapeIndexProp);
395 void WriteStringByOptions(ReadOnlySpan<char16_t> propertyName, DateTime value);
396 void WriteStringByOptions(ReadOnlySpan<uint8_t> utf8PropertyName, DateTime value);
397 void WriteStringMinimized(ReadOnlySpan<char16_t> escapedPropertyName, DateTime value);
398 void WriteStringMinimized(ReadOnlySpan<uint8_t> escapedPropertyName, DateTime value);
399 void WriteStringIndented(ReadOnlySpan<char16_t> escapedPropertyName, DateTime value);
400 void WriteStringIndented(ReadOnlySpan<uint8_t> escapedPropertyName, DateTime value);
401 void WriteStringEscape(ReadOnlySpan<char16_t> propertyName, DateTimeOffset value);
402 void WriteStringEscape(ReadOnlySpan<uint8_t> utf8PropertyName, DateTimeOffset value);
403 void WriteStringEscapeProperty(ReadOnlySpan<char16_t> propertyName, DateTimeOffset value, int32_t firstEscapeIndexProp);
404 void WriteStringEscapeProperty(ReadOnlySpan<uint8_t> utf8PropertyName, DateTimeOffset value, int32_t firstEscapeIndexProp);
405 void WriteStringByOptions(ReadOnlySpan<char16_t> propertyName, DateTimeOffset value);
406 void WriteStringByOptions(ReadOnlySpan<uint8_t> utf8PropertyName, DateTimeOffset value);
407 void WriteStringMinimized(ReadOnlySpan<char16_t> escapedPropertyName, DateTimeOffset value);
408 void WriteStringMinimized(ReadOnlySpan<uint8_t> escapedPropertyName, DateTimeOffset value);
409 void WriteStringIndented(ReadOnlySpan<char16_t> escapedPropertyName, DateTimeOffset value);
410 void WriteStringIndented(ReadOnlySpan<uint8_t> escapedPropertyName, DateTimeOffset value);
411 void WriteNumberEscape(ReadOnlySpan<char16_t> propertyName, Decimal value);
412 void WriteNumberEscape(ReadOnlySpan<uint8_t> utf8PropertyName, Decimal value);
413 void WriteNumberEscapeProperty(ReadOnlySpan<char16_t> propertyName, Decimal value, int32_t firstEscapeIndexProp);
414 void WriteNumberEscapeProperty(ReadOnlySpan<uint8_t> utf8PropertyName, Decimal value, int32_t firstEscapeIndexProp);
415 void WriteNumberByOptions(ReadOnlySpan<char16_t> propertyName, Decimal value);
416 void WriteNumberByOptions(ReadOnlySpan<uint8_t> utf8PropertyName, Decimal value);
417 void WriteNumberMinimized(ReadOnlySpan<char16_t> escapedPropertyName, Decimal value);
418 void WriteNumberMinimized(ReadOnlySpan<uint8_t> escapedPropertyName, Decimal value);
419 void WriteNumberIndented(ReadOnlySpan<char16_t> escapedPropertyName, Decimal value);
420 void WriteNumberIndented(ReadOnlySpan<uint8_t> escapedPropertyName, Decimal value);
421 void WriteNumberEscape(ReadOnlySpan<char16_t> propertyName, double value);
422 void WriteNumberEscape(ReadOnlySpan<uint8_t> utf8PropertyName, double value);
423 void WriteNumberEscapeProperty(ReadOnlySpan<char16_t> propertyName, double value, int32_t firstEscapeIndexProp);
424 void WriteNumberEscapeProperty(ReadOnlySpan<uint8_t> utf8PropertyName, double value, int32_t firstEscapeIndexProp);
425 void WriteNumberByOptions(ReadOnlySpan<char16_t> propertyName, double value);
426 void WriteNumberByOptions(ReadOnlySpan<uint8_t> utf8PropertyName, double value);
427 void WriteNumberMinimized(ReadOnlySpan<char16_t> escapedPropertyName, double value);
428 void WriteNumberMinimized(ReadOnlySpan<uint8_t> escapedPropertyName, double value);
429 void WriteNumberIndented(ReadOnlySpan<char16_t> escapedPropertyName, double value);
430 void WriteNumberIndented(ReadOnlySpan<uint8_t> escapedPropertyName, double value);
431 void WriteNumberEscape(ReadOnlySpan<char16_t> propertyName, float value);
432 void WriteNumberEscape(ReadOnlySpan<uint8_t> utf8PropertyName, float value);
433 void WriteNumberEscapeProperty(ReadOnlySpan<char16_t> propertyName, float value, int32_t firstEscapeIndexProp);
434 void WriteNumberEscapeProperty(ReadOnlySpan<uint8_t> utf8PropertyName, float value, int32_t firstEscapeIndexProp);
435 void WriteNumberByOptions(ReadOnlySpan<char16_t> propertyName, float value);
436 void WriteNumberByOptions(ReadOnlySpan<uint8_t> utf8PropertyName, float value);
437 void WriteNumberMinimized(ReadOnlySpan<char16_t> escapedPropertyName, float value);
438 void WriteNumberMinimized(ReadOnlySpan<uint8_t> escapedPropertyName, float value);
439 void WriteNumberIndented(ReadOnlySpan<char16_t> escapedPropertyName, float value);
440 void WriteNumberIndented(ReadOnlySpan<uint8_t> escapedPropertyName, float value);
441 void WriteNumberEscape(ReadOnlySpan<char16_t> propertyName, ReadOnlySpan<uint8_t> value);
442 void WriteNumberEscape(ReadOnlySpan<uint8_t> utf8PropertyName, ReadOnlySpan<uint8_t> value);
443 void WriteNumberEscapeProperty(ReadOnlySpan<char16_t> propertyName, ReadOnlySpan<uint8_t> value, int32_t firstEscapeIndexProp);
444 void WriteNumberEscapeProperty(ReadOnlySpan<uint8_t> utf8PropertyName, ReadOnlySpan<uint8_t> value, int32_t firstEscapeIndexProp);
445 void WriteNumberByOptions(ReadOnlySpan<char16_t> propertyName, ReadOnlySpan<uint8_t> value);
446 void WriteNumberByOptions(ReadOnlySpan<uint8_t> utf8PropertyName, ReadOnlySpan<uint8_t> value);
447 void WriteStringEscape(ReadOnlySpan<char16_t> propertyName, Guid value);
448 void WriteStringEscape(ReadOnlySpan<uint8_t> utf8PropertyName, Guid value);
449 void WriteStringEscapeProperty(ReadOnlySpan<char16_t> propertyName, Guid value, int32_t firstEscapeIndexProp);
450 void WriteStringEscapeProperty(ReadOnlySpan<uint8_t> utf8PropertyName, Guid value, int32_t firstEscapeIndexProp);
451 void WriteStringByOptions(ReadOnlySpan<char16_t> propertyName, Guid value);
452 void WriteStringByOptions(ReadOnlySpan<uint8_t> utf8PropertyName, Guid value);
453 void WriteStringMinimized(ReadOnlySpan<char16_t> escapedPropertyName, Guid value);
454 void WriteStringMinimized(ReadOnlySpan<uint8_t> escapedPropertyName, Guid value);
455 void WriteStringIndented(ReadOnlySpan<char16_t> escapedPropertyName, Guid value);
456 void WriteStringIndented(ReadOnlySpan<uint8_t> escapedPropertyName, Guid value);
457 void ValidatePropertyNameAndDepth(ReadOnlySpan<char16_t> propertyName);
458 void ValidatePropertyNameAndDepth(ReadOnlySpan<uint8_t> utf8PropertyName);
459 void ValidateDepth();
460 void ValidateWritingProperty();
461 void ValidateWritingProperty(uint8_t token);
462 void OnValidateWritingPropertyFailed();
463 void WritePropertyNameMinimized(ReadOnlySpan<uint8_t> escapedPropertyName, uint8_t token);
464 void WritePropertyNameIndented(ReadOnlySpan<uint8_t> escapedPropertyName, uint8_t token);
465 void WritePropertyNameMinimized(ReadOnlySpan<char16_t> escapedPropertyName, uint8_t token);
466 void WritePropertyNameIndented(ReadOnlySpan<char16_t> escapedPropertyName, uint8_t token);
467 void TranscodeAndWrite(ReadOnlySpan<char16_t> escapedPropertyName, Span<uint8_t> output);
468 void WriteLiteralHelper(ReadOnlySpan<uint8_t> utf8PropertyName, ReadOnlySpan<uint8_t> value);
469 void WriteLiteralEscape(ReadOnlySpan<char16_t> propertyName, ReadOnlySpan<uint8_t> value);
470 void WriteLiteralEscape(ReadOnlySpan<uint8_t> utf8PropertyName, ReadOnlySpan<uint8_t> value);
471 void WriteLiteralEscapeProperty(ReadOnlySpan<char16_t> propertyName, ReadOnlySpan<uint8_t> value, int32_t firstEscapeIndexProp);
472 void WriteLiteralEscapeProperty(ReadOnlySpan<uint8_t> utf8PropertyName, ReadOnlySpan<uint8_t> value, int32_t firstEscapeIndexProp);
473 void WriteLiteralByOptions(ReadOnlySpan<char16_t> propertyName, ReadOnlySpan<uint8_t> value);
474 void WriteLiteralByOptions(ReadOnlySpan<uint8_t> utf8PropertyName, ReadOnlySpan<uint8_t> value);
475 void WriteLiteralMinimized(ReadOnlySpan<char16_t> escapedPropertyName, ReadOnlySpan<uint8_t> value);
476 void WriteLiteralMinimized(ReadOnlySpan<uint8_t> escapedPropertyName, ReadOnlySpan<uint8_t> value);
477 void WriteLiteralSection(ReadOnlySpan<uint8_t> escapedPropertyNameSection, ReadOnlySpan<uint8_t> value);
478 void WriteLiteralIndented(ReadOnlySpan<char16_t> escapedPropertyName, ReadOnlySpan<uint8_t> value);
479 void WriteLiteralIndented(ReadOnlySpan<uint8_t> escapedPropertyName, ReadOnlySpan<uint8_t> value);
480 void WriteNumberEscape(ReadOnlySpan<char16_t> propertyName, int64_t value);
481 void WriteNumberEscape(ReadOnlySpan<uint8_t> utf8PropertyName, int64_t value);
482 void WriteNumberEscapeProperty(ReadOnlySpan<char16_t> propertyName, int64_t value, int32_t firstEscapeIndexProp);
483 void WriteNumberEscapeProperty(ReadOnlySpan<uint8_t> utf8PropertyName, int64_t value, int32_t firstEscapeIndexProp);
484 void WriteNumberByOptions(ReadOnlySpan<char16_t> propertyName, int64_t value);
485 void WriteNumberByOptions(ReadOnlySpan<uint8_t> utf8PropertyName, int64_t value);
486 void WriteNumberMinimized(ReadOnlySpan<char16_t> escapedPropertyName, int64_t value);
487 void WriteNumberMinimized(ReadOnlySpan<uint8_t> escapedPropertyName, int64_t value);
488 void WriteNumberIndented(ReadOnlySpan<char16_t> escapedPropertyName, int64_t value);
489 void WriteNumberIndented(ReadOnlySpan<uint8_t> escapedPropertyName, int64_t value);
490 void WritePropertyNameHelper(ReadOnlySpan<uint8_t> utf8PropertyName);
491 void WriteStringEscapeProperty(ReadOnlySpan<char16_t> propertyName, int32_t firstEscapeIndexProp);
492 void WriteStringByOptionsPropertyName(ReadOnlySpan<char16_t> propertyName);
493 void WriteStringMinimizedPropertyName(ReadOnlySpan<char16_t> escapedPropertyName);
494 void WriteStringIndentedPropertyName(ReadOnlySpan<char16_t> escapedPropertyName);
495 void WritePropertyNameUnescaped(ReadOnlySpan<uint8_t> utf8PropertyName);
496 void WriteStringEscapeProperty(ReadOnlySpan<uint8_t> utf8PropertyName, int32_t firstEscapeIndexProp);
497 void WriteStringByOptionsPropertyName(ReadOnlySpan<uint8_t> utf8PropertyName);
498 void WriteStringMinimizedPropertyName(ReadOnlySpan<uint8_t> escapedPropertyName);
499 void WriteStringPropertyNameSection(ReadOnlySpan<uint8_t> escapedPropertyNameSection);
500 void WriteStringIndentedPropertyName(ReadOnlySpan<uint8_t> escapedPropertyName);
501 void WriteStringHelper(ReadOnlySpan<uint8_t> utf8PropertyName, ReadOnlySpan<uint8_t> utf8Value);
502 void WriteStringHelperEscapeValue(ReadOnlySpan<uint8_t> utf8PropertyName, ReadOnlySpan<char16_t> value);
503 void WriteStringHelperEscapeValue(ReadOnlySpan<uint8_t> utf8PropertyName, ReadOnlySpan<uint8_t> utf8Value);
504 void WriteStringHelperEscapeProperty(ReadOnlySpan<char16_t> propertyName, ReadOnlySpan<uint8_t> utf8Value);
505 void WriteStringHelperEscapeProperty(ReadOnlySpan<uint8_t> utf8PropertyName, ReadOnlySpan<uint8_t> utf8Value);
506 void WriteStringEscapeValueOnly(ReadOnlySpan<uint8_t> escapedPropertyName, ReadOnlySpan<uint8_t> utf8Value, int32_t firstEscapeIndex);
507 void WriteStringEscapeValueOnly(ReadOnlySpan<uint8_t> escapedPropertyName, ReadOnlySpan<char16_t> value, int32_t firstEscapeIndex);
508 void WriteStringEscapePropertyOnly(ReadOnlySpan<char16_t> propertyName, ReadOnlySpan<uint8_t> escapedValue, int32_t firstEscapeIndex);
509 void WriteStringEscapePropertyOnly(ReadOnlySpan<uint8_t> utf8PropertyName, ReadOnlySpan<uint8_t> escapedValue, int32_t firstEscapeIndex);
510 void WriteStringEscape(ReadOnlySpan<char16_t> propertyName, ReadOnlySpan<char16_t> value);
511 void WriteStringEscape(ReadOnlySpan<uint8_t> utf8PropertyName, ReadOnlySpan<uint8_t> utf8Value);
512 void WriteStringEscape(ReadOnlySpan<char16_t> propertyName, ReadOnlySpan<uint8_t> utf8Value);
513 void WriteStringEscape(ReadOnlySpan<uint8_t> utf8PropertyName, ReadOnlySpan<char16_t> value);
514 void WriteStringEscapePropertyOrValue(ReadOnlySpan<char16_t> propertyName, ReadOnlySpan<char16_t> value, int32_t firstEscapeIndexProp, int32_t firstEscapeIndexVal);
515 void WriteStringEscapePropertyOrValue(ReadOnlySpan<uint8_t> utf8PropertyName, ReadOnlySpan<uint8_t> utf8Value, int32_t firstEscapeIndexProp, int32_t firstEscapeIndexVal);
516 void WriteStringEscapePropertyOrValue(ReadOnlySpan<char16_t> propertyName, ReadOnlySpan<uint8_t> utf8Value, int32_t firstEscapeIndexProp, int32_t firstEscapeIndexVal);
517 void WriteStringEscapePropertyOrValue(ReadOnlySpan<uint8_t> utf8PropertyName, ReadOnlySpan<char16_t> value, int32_t firstEscapeIndexProp, int32_t firstEscapeIndexVal);
518 void WriteStringByOptions(ReadOnlySpan<char16_t> propertyName, ReadOnlySpan<char16_t> value);
519 void WriteStringByOptions(ReadOnlySpan<uint8_t> utf8PropertyName, ReadOnlySpan<uint8_t> utf8Value);
520 void WriteStringByOptions(ReadOnlySpan<char16_t> propertyName, ReadOnlySpan<uint8_t> utf8Value);
521 void WriteStringByOptions(ReadOnlySpan<uint8_t> utf8PropertyName, ReadOnlySpan<char16_t> value);
522 void WriteStringMinimized(ReadOnlySpan<char16_t> escapedPropertyName, ReadOnlySpan<char16_t> escapedValue);
523 void WriteStringMinimized(ReadOnlySpan<uint8_t> escapedPropertyName, ReadOnlySpan<uint8_t> escapedValue);
524 void WriteStringMinimized(ReadOnlySpan<char16_t> escapedPropertyName, ReadOnlySpan<uint8_t> escapedValue);
525 void WriteStringMinimized(ReadOnlySpan<uint8_t> escapedPropertyName, ReadOnlySpan<char16_t> escapedValue);
526 void WriteStringIndented(ReadOnlySpan<char16_t> escapedPropertyName, ReadOnlySpan<char16_t> escapedValue);
527 void WriteStringIndented(ReadOnlySpan<uint8_t> escapedPropertyName, ReadOnlySpan<uint8_t> escapedValue);
528 void WriteStringIndented(ReadOnlySpan<char16_t> escapedPropertyName, ReadOnlySpan<uint8_t> escapedValue);
529 void WriteStringIndented(ReadOnlySpan<uint8_t> escapedPropertyName, ReadOnlySpan<char16_t> escapedValue);
530 void WriteNumberEscape(ReadOnlySpan<char16_t> propertyName, uint64_t value);
531 void WriteNumberEscape(ReadOnlySpan<uint8_t> utf8PropertyName, uint64_t value);
532 void WriteNumberEscapeProperty(ReadOnlySpan<char16_t> propertyName, uint64_t value, int32_t firstEscapeIndexProp);
533 void WriteNumberEscapeProperty(ReadOnlySpan<uint8_t> utf8PropertyName, uint64_t value, int32_t firstEscapeIndexProp);
534 void WriteNumberByOptions(ReadOnlySpan<char16_t> propertyName, uint64_t value);
535 void WriteNumberByOptions(ReadOnlySpan<uint8_t> utf8PropertyName, uint64_t value);
536 void WriteNumberMinimized(ReadOnlySpan<char16_t> escapedPropertyName, uint64_t value);
537 void WriteNumberMinimized(ReadOnlySpan<uint8_t> escapedPropertyName, uint64_t value);
538 void WriteNumberIndented(ReadOnlySpan<char16_t> escapedPropertyName, uint64_t value);
539 void WriteNumberIndented(ReadOnlySpan<uint8_t> escapedPropertyName, uint64_t value);
540 void WriteBase64ByOptions(ReadOnlySpan<uint8_t> bytes);
541 void WriteBase64Minimized(ReadOnlySpan<uint8_t> bytes);
542 void WriteBase64Indented(ReadOnlySpan<uint8_t> bytes);
543 void WriteStringValueMinimized(DateTime value);
544 void WriteStringValueIndented(DateTime value);
545 void WriteStringValueMinimized(DateTimeOffset value);
546 void WriteStringValueIndented(DateTimeOffset value);
547 void WriteNumberValueMinimized(Decimal value);
548 void WriteNumberValueIndented(Decimal value);
549 void WriteNumberValueMinimized(double value);
550 void WriteNumberValueIndented(double value);
551 static bool TryFormatDouble(double value, Span<uint8_t> destination, int32_t& bytesWritten);
552 void WriteNumberValueMinimized(float value);
553 void WriteNumberValueIndented(float value);
554 static bool TryFormatSingle(float value, Span<uint8_t> destination, int32_t& bytesWritten);
555 void WriteNumberValueMinimized(ReadOnlySpan<uint8_t> utf8Value);
556 void WriteNumberValueIndented(ReadOnlySpan<uint8_t> utf8Value);
557 void WriteStringValueMinimized(Guid value);
558 void WriteStringValueIndented(Guid value);
559 void ClearPartialStringData();
560 void ValidateWritingValue();
561 void OnValidateWritingValueFailed();
562 void ValidateWritingSegment(Utf8JsonWriter::EnclosingContainerType currentSegmentEncoding);
563 void OnValidateWritingSegmentFailed(Utf8JsonWriter::EnclosingContainerType currentSegmentEncoding);
564 void ValidateNotWithinUnfinalizedString();
565 void Base64EncodeAndWrite(ReadOnlySpan<uint8_t> bytes, Span<uint8_t> output);
566 void WriteLiteralByOptions(ReadOnlySpan<uint8_t> utf8Value);
567 void WriteLiteralMinimized(ReadOnlySpan<uint8_t> utf8Value);
568 void WriteLiteralIndented(ReadOnlySpan<uint8_t> utf8Value);
569 void TranscodeAndWriteRawValue(ReadOnlySpan<char16_t> json, bool skipInputValidation);
570 void WriteRawValueCore(ReadOnlySpan<uint8_t> utf8Json, bool skipInputValidation);
571 void WriteNumberValueMinimized(int64_t value);
572 void WriteNumberValueIndented(int64_t value);
573 void WriteStringEscape(ReadOnlySpan<char16_t> value);
574 void WriteStringByOptions(ReadOnlySpan<char16_t> value, int32_t maxRequiredBytes);
575 void WriteStringMinimized(ReadOnlySpan<char16_t> escapedValue, int32_t maxRequiredBytes);
576 void WriteStringIndented(ReadOnlySpan<char16_t> escapedValue, int32_t maxRequiredBytes);
577 void WriteStringEscapeValue(ReadOnlySpan<char16_t> value, int32_t firstEscapeIndexVal);
578 void WriteStringEscape(ReadOnlySpan<uint8_t> utf8Value);
579 void WriteStringByOptions(ReadOnlySpan<uint8_t> utf8Value);
580 void WriteStringMinimized(ReadOnlySpan<uint8_t> escapedValue);
581 void WriteStringIndented(ReadOnlySpan<uint8_t> escapedValue);
582 void WriteStringEscapeValue(ReadOnlySpan<uint8_t> utf8Value, int32_t firstEscapeIndexVal);
583 void WriteStringSegmentWithLeftover(ReadOnlySpan<char16_t> value, bool isFinalSegment);
584 void WriteStringSegmentEscape(ReadOnlySpan<char16_t> value, bool isFinalSegment);
585 void WriteStringSegmentEscapeValue(ReadOnlySpan<char16_t> value, int32_t firstEscapeIndexVal, bool isFinalSegment);
586 void WriteStringSegmentData(ReadOnlySpan<char16_t> escapedValue);
587 void WriteStringSegmentWithLeftover(ReadOnlySpan<uint8_t> utf8Value, bool isFinalSegment);
588 void WriteStringSegmentEscape(ReadOnlySpan<uint8_t> utf8Value, bool isFinalSegment);
589 void WriteStringSegmentEscapeValue(ReadOnlySpan<uint8_t> utf8Value, int32_t firstEscapeIndexVal, bool isFinalSegment);
590 void WriteStringSegmentData(ReadOnlySpan<uint8_t> escapedValue);
591 void WriteBase64StringSegmentWithLeftover(ReadOnlySpan<uint8_t> bytes, bool isFinalSegment);
592 void WriteBase64StringSegmentData(ReadOnlySpan<uint8_t> bytes, bool isFinalSegment);
593 void WriteStringSegmentPrologue();
594 void WriteStringSegmentIndentedPrologue();
595 void WriteStringSegmentMinimizedPrologue();
596 void WriteStringSegmentEpilogue();
597 template<typename T>
598 static int32_t ConcatInto(ReadOnlySpan<T> srcLeft, ReadOnlySpan<T> srcRight, Span<T> dest)
599 {
600 int32_t total = 0;
601 for (int32_t i = 0; i < srcLeft.get_Length(); i++)
602 {
603 if ((uint32_t)total >= (uint32_t)dest.get_Length())
604 {
605 goto Finish;
606 }
607 else
608 {
609 dest[total++] = srcLeft[i];
610 }
611 }
612 for (int32_t i = 0; i < srcRight.get_Length(); i++)
613 {
614 if ((uint32_t)total >= (uint32_t)dest.get_Length())
615 {
616 goto Finish;
617 }
618 else
619 {
620 dest[total++] = srcRight[i];
621 }
622 }
623 Finish:
624 return total;
625 }
626
627 void WriteNumberValueMinimized(uint64_t value);
628 void WriteNumberValueIndented(uint64_t value);
629
630};
631
632} // namespace Json
633} // namespace Text
634} // 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 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
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
Represents a contiguous region of arbitrary memory similar to C++20's std::span.
Definition: span.h:375
String class used across the library. Is a substitute for C# System.String when translating code....
Definition: string.h:126
Definition: json_bit_stack.h:13
Definition: json_document.h:71
Definition: json_encoded_text.h:29
Definition: json_writer_options.h:31
Definition: json_value_of_json_primitive.h:223
Definition: json_converter_of_t.h:80
Definition: throw_helper.h:91
Definition: utf8_json_writer_cache.h:31
Definition: utf8_json_writer.h:81
void WriteString(ReadOnlySpan< uint8_t > utf8PropertyName, DateTime value)
void WriteNumberValue(uint64_t value)
Utf8JsonWriter(System::SharedPtr< IO::Stream > utf8Json, JsonWriterOptions options=System::Default< System::Text::Json::JsonWriterOptions >())
void WriteNumber(JsonEncodedText propertyName, double value)
void WriteBase64StringValue(ReadOnlySpan< uint8_t > bytes)
void WriteBase64String(ReadOnlySpan< char16_t > propertyName, ReadOnlySpan< uint8_t > bytes)
void WriteNumber(ReadOnlySpan< char16_t > propertyName, uint32_t value)
void WriteNumberValueAsString(int64_t value)
void WriteBoolean(JsonEncodedText propertyName, bool value)
void Reset(System::SharedPtr< IO::Stream > utf8Json, JsonWriterOptions options)
void WriteString(ReadOnlySpan< uint8_t > utf8PropertyName, ReadOnlySpan< char16_t > value)
void WriteBase64String(JsonEncodedText propertyName, ReadOnlySpan< uint8_t > bytes)
void WritePropertyName(DateTimeOffset value)
void WriteStringValue(DateTime value)
void WriteNumber(JsonEncodedText propertyName, int64_t value)
void Dispose() override
Does nothing.
void WriteNull(ReadOnlySpan< uint8_t > utf8PropertyName)
void WriteNumber(JsonEncodedText propertyName, uint32_t value)
void WritePropertyName(ReadOnlySpan< uint8_t > utf8PropertyName)
void WriteNumberValue(Decimal value)
void WriteStartObject(String propertyName)
void WriteString(JsonEncodedText propertyName, JsonEncodedText value)
void WriteBoolean(String propertyName, bool value)
void WriteString(String propertyName, ReadOnlySpan< uint8_t > utf8Value)
void WritePropertyName(String propertyName)
void WritePropertyName(double value)
void WriteNumber(ReadOnlySpan< char16_t > propertyName, double value)
void WriteNumber(String propertyName, uint32_t value)
void WriteNullSection(ReadOnlySpan< uint8_t > escapedPropertyNameSection)
void WritePropertyName(int32_t value)
void WriteNumberValueAsString(Decimal value)
void WriteBase64String(ReadOnlySpan< uint8_t > utf8PropertyName, ReadOnlySpan< uint8_t > bytes)
void WriteString(ReadOnlySpan< uint8_t > utf8PropertyName, DateTimeOffset value)
void WriteStringValue(ReadOnlySpan< char16_t > value)
void WriteNumber(ReadOnlySpan< uint8_t > utf8PropertyName, double value)
void WriteNumber(String propertyName, int32_t value)
void WritePropertyName(uint64_t value)
void WriteString(ReadOnlySpan< uint8_t > utf8PropertyName, Guid value)
void WriteNumberValue(double value)
void WriteNumber(String propertyName, float value)
void WritePropertyName(uint32_t value)
void WriteStartArray(ReadOnlySpan< uint8_t > utf8PropertyName)
void WriteStringValue(String value)
void WriteNumberValue(ReadOnlySpan< uint8_t > utf8FormattedNumber)
void WriteNumber(ReadOnlySpan< char16_t > propertyName, int64_t value)
void WriteBase64String(String propertyName, ReadOnlySpan< uint8_t > bytes)
static System::SharedPtr< Utf8JsonWriter > CreateEmptyInstanceForCaching()
void WriteNumber(JsonEncodedText propertyName, int32_t value)
void WriteNumber(JsonEncodedText propertyName, uint64_t value)
void WriteString(String propertyName, ReadOnlySpan< char16_t > value)
void WriteNumber(String propertyName, double value)
void WriteNumberValue(int64_t value)
void WriteString(String propertyName, JsonEncodedText value)
void WriteNumber(ReadOnlySpan< uint8_t > utf8PropertyName, int32_t value)
void WriteString(ReadOnlySpan< char16_t > propertyName, DateTime value)
void WriteFloatingPointConstant(double value)
void WriteNumber(String propertyName, uint64_t value)
void WriteString(ReadOnlySpan< char16_t > propertyName, Guid value)
void WriteString(ReadOnlySpan< char16_t > propertyName, String value)
void WriteNumber(ReadOnlySpan< char16_t > propertyName, ReadOnlySpan< uint8_t > utf8FormattedNumber)
void WriteStartArray(ReadOnlySpan< char16_t > propertyName)
void WriteString(JsonEncodedText propertyName, DateTimeOffset value)
void WriteRawValue(ReadOnlySpan< char16_t > json, bool skipInputValidation=false)
void WriteNumber(String propertyName, int64_t value)
void WriteNumber(ReadOnlySpan< uint8_t > utf8PropertyName, float value)
void WriteString(ReadOnlySpan< char16_t > propertyName, JsonEncodedText value)
void WritePropertyName(const char16_t *propertyName)
void WriteStringValue(DateTimeOffset value)
Utf8JsonWriter(System::SharedPtr< Buffers::IBufferWriter< uint8_t > > bufferWriter, JsonWriterOptions options=System::Default< System::Text::Json::JsonWriterOptions >())
void WriteString(String propertyName, DateTime value)
void WriteFloatingPointConstant(float value)
void Reset(System::SharedPtr< IO::Stream > utf8Json)
void WriteStringValueSegment(ReadOnlySpan< uint8_t > value, bool isFinalSegment)
void WriteNumberValueAsString(double value)
void WriteString(String propertyName, String value)
void WriteStartObject(ReadOnlySpan< char16_t > propertyName)
void WriteNumber(ReadOnlySpan< uint8_t > utf8PropertyName, uint32_t value)
void WriteNull(ReadOnlySpan< char16_t > propertyName)
void WriteStartArray(String propertyName)
void WriteNumberValueAsString(uint64_t value)
void ConfigureForCacheReuse(System::SharedPtr< Buffers::IBufferWriter< uint8_t > > bufferWriter, JsonWriterOptions options)
void WriteNumberValueAsStringUnescaped(ReadOnlySpan< uint8_t > utf8Value)
void WriteNumber(ReadOnlySpan< uint8_t > utf8PropertyName, uint64_t value)
void WriteNumber(ReadOnlySpan< char16_t > propertyName, Decimal value)
void WriteStartObject(JsonEncodedText propertyName)
void WriteNumber(JsonEncodedText propertyName, float value)
void WriteNumberValue(int32_t value)
void WriteStartArray(JsonEncodedText propertyName)
void WriteString(JsonEncodedText propertyName, Guid value)
void WriteNumber(ReadOnlySpan< char16_t > propertyName, uint64_t value)
void WritePropertyNameSection(ReadOnlySpan< uint8_t > escapedPropertyNameSection)
void WriteBase64StringSegment(ReadOnlySpan< uint8_t > value, bool isFinalSegment)
void WriteNumber(ReadOnlySpan< char16_t > propertyName, int32_t value)
void WriteString(JsonEncodedText propertyName, String value)
void WriteStringValue(ReadOnlySpan< uint8_t > utf8Value)
void WriteString(ReadOnlySpan< char16_t > propertyName, ReadOnlySpan< uint8_t > utf8Value)
void WriteBoolean(ReadOnlySpan< char16_t > propertyName, bool value)
void WriteStringValueSegment(ReadOnlySpan< char16_t > value, bool isFinalSegment)
void WriteNumberValueAsString(float value)
void WritePropertyName(JsonEncodedText propertyName)
void WriteNumberValue(uint32_t value)
void WriteString(JsonEncodedText propertyName, ReadOnlySpan< char16_t > value)
void WriteNumber(ReadOnlySpan< uint8_t > utf8PropertyName, Decimal value)
void WritePropertyName(Decimal value)
void WriteBoolean(ReadOnlySpan< uint8_t > utf8PropertyName, bool value)
void WriteNumber(ReadOnlySpan< uint8_t > utf8PropertyName, ReadOnlySpan< uint8_t > utf8FormattedNumber)
void WriteNumber(String propertyName, Decimal value)
void WriteString(JsonEncodedText propertyName, DateTime value)
void WriteNumber(ReadOnlySpan< uint8_t > utf8PropertyName, int64_t value)
void WriteString(ReadOnlySpan< char16_t > propertyName, ReadOnlySpan< char16_t > value)
void WritePropertyName(ReadOnlySpan< char16_t > propertyName)
void WriteRawValue(String json, bool skipInputValidation=false)
void WriteRawValue(Buffers::ReadOnlySequence< uint8_t > utf8Json, bool skipInputValidation=false)
void WriteString(ReadOnlySpan< uint8_t > utf8PropertyName, String value)
void WriteString(String propertyName, DateTimeOffset value)
void WriteNumber(JsonEncodedText propertyName, ReadOnlySpan< uint8_t > utf8FormattedNumber)
void WriteStringValue(JsonEncodedText value)
void WriteNull(String propertyName)
void WriteString(ReadOnlySpan< char16_t > propertyName, DateTimeOffset value)
void WriteString(String propertyName, Guid value)
void WriteStartObject(ReadOnlySpan< uint8_t > utf8PropertyName)
void WriteString(JsonEncodedText propertyName, ReadOnlySpan< uint8_t > utf8Value)
void WritePropertyName(DateTime value)
void WriteNull(JsonEncodedText propertyName)
void Reset(System::SharedPtr< Buffers::IBufferWriter< uint8_t > > bufferWriter, JsonWriterOptions options)
void WriteNumber(ReadOnlySpan< char16_t > propertyName, float value)
EnclosingContainerType
Definition: utf8_json_writer.h:114
void Reset(System::SharedPtr< Buffers::IBufferWriter< uint8_t > > bufferWriter)
void WritePropertyName(int64_t value)
void WriteString(ReadOnlySpan< uint8_t > utf8PropertyName, ReadOnlySpan< uint8_t > utf8Value)
void WriteString(ReadOnlySpan< uint8_t > utf8PropertyName, JsonEncodedText value)
void WriteNumber(JsonEncodedText propertyName, Decimal value)
void WriteRawValue(ReadOnlySpan< uint8_t > utf8Json, bool skipInputValidation=false)
@ 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
ExceptionResource
Definition: throw_helper.h:273
Definition: db_command.h:9