System.Text.Json
15 wrapped types. Load them with using { "System.Text.Json" }. Click a class to open it.
JsonDocument class sealed
System.Text.Json.JsonDocument · assembly System.Text.Json
Implements: IDisposable
Properties and fields
| Name | Type | Access | In Ring |
|---|---|---|---|
RootElement | JsonElement | read | o.RootElement |
Methods
| Method | Ring call | .NET overloads |
|---|---|---|
Dispose | callMethod("Dispose",[]) | void Dispose() |
Parse | Parse([ :utf8Json = …, :options = … ])Parse([ :json = …, :options = … ]) | static JsonDocument Parse(ReadOnlyMemory<byte> utf8Json, JsonDocumentOptions options = …)static JsonDocument Parse(ReadOnlySequence<byte> utf8Json, JsonDocumentOptions options = …)static JsonDocument Parse(Stream utf8Json, JsonDocumentOptions options = …)static JsonDocument Parse(ReadOnlyMemory<char> json, JsonDocumentOptions options = …)static JsonDocument Parse(string json, JsonDocumentOptions options = …) |
ParseAsync | ParseAsync([ :utf8Json = …, :options = …, :cancellationToken = … ]) | static Task<JsonDocument> ParseAsync(Stream utf8Json, JsonDocumentOptions options = …, CancellationToken cancellationToken = …) |
ParseValue | ParseValue(p1) | static JsonDocument ParseValue(ref Utf8JsonReader reader) |
TryParseValue | TryParseValue(p1) | static bool TryParseValue(ref Utf8JsonReader reader, out JsonDocument document) |
WriteTo | WriteTo(p1) | void WriteTo(Utf8JsonWriter writer) |
JsonDocumentOptions struct
System.Text.Json.JsonDocumentOptions · assembly System.Text.Json
Properties and fields
| Name | Type | Access | In Ring |
|---|---|---|---|
CommentHandling | JsonCommentHandling | read, write | o.CommentHandling o.CommentHandling = v |
MaxDepth | int | read, write | o.MaxDepth o.MaxDepth = v |
AllowTrailingCommas | bool | read, write | o.AllowTrailingCommas o.AllowTrailingCommas = v |
JsonElement struct
System.Text.Json.JsonElement · assembly System.Text.Json
Properties and fields
| Name | Type | Access | In Ring |
|---|---|---|---|
ValueKind | JsonValueKind | read | o.ValueKind |
Indexer
o.Item(int index) → JsonElement
Methods
| Method | Ring call | .NET overloads |
|---|---|---|
Clone | callMethod("Clone",[]) | JsonElement Clone() |
DeepEquals | DeepEquals(p1,p2) | static bool DeepEquals(JsonElement element1, JsonElement element2) |
EnumerateArray | callMethod("EnumerateArray",[]) | JsonElement.ArrayEnumerator EnumerateArray() |
EnumerateObject | callMethod("EnumerateObject",[]) | JsonElement.ObjectEnumerator EnumerateObject() |
GetArrayLength | callMethod("GetArrayLength",[]) | int GetArrayLength() |
GetBoolean | callMethod("GetBoolean",[]) | bool GetBoolean() |
GetByte | callMethod("GetByte",[]) | byte GetByte() |
GetBytesFromBase64 | callMethod("GetBytesFromBase64",[]) | byte[] GetBytesFromBase64() |
GetDateTime | callMethod("GetDateTime",[]) | DateTime GetDateTime() |
GetDateTimeOffset | callMethod("GetDateTimeOffset",[]) | DateTimeOffset GetDateTimeOffset() |
GetDecimal | callMethod("GetDecimal",[]) | decimal GetDecimal() |
GetDouble | callMethod("GetDouble",[]) | double GetDouble() |
GetGuid | callMethod("GetGuid",[]) | Guid GetGuid() |
GetInt16 | callMethod("GetInt16",[]) | short GetInt16() |
GetInt32 | callMethod("GetInt32",[]) | int GetInt32() |
GetInt64 | callMethod("GetInt64",[]) | long GetInt64() |
GetProperty | callMethod("GetProperty",[p1]) | JsonElement GetProperty(string propertyName)JsonElement GetProperty(ReadOnlySpan<char> propertyName)JsonElement GetProperty(ReadOnlySpan<byte> utf8PropertyName) |
GetPropertyCount | callMethod("GetPropertyCount",[]) | int GetPropertyCount() |
GetRawText | callMethod("GetRawText",[]) | string GetRawText() |
GetSByte | callMethod("GetSByte",[]) | sbyte GetSByte() |
GetSingle | callMethod("GetSingle",[]) | float GetSingle() |
GetString | callMethod("GetString",[]) | string GetString() |
GetUInt16 | callMethod("GetUInt16",[]) | ushort GetUInt16() |
GetUInt32 | callMethod("GetUInt32",[]) | uint GetUInt32() |
GetUInt64 | callMethod("GetUInt64",[]) | ulong GetUInt64() |
ParseValue | ParseValue(p1) | static JsonElement ParseValue(ref Utf8JsonReader reader) |
ToString | callMethod("ToString",[]) | string ToString() |
TryGetByte | TryGetByte() | bool TryGetByte(out byte value) |
TryGetBytesFromBase64 | TryGetBytesFromBase64() | bool TryGetBytesFromBase64(out byte[] value) |
TryGetDateTime | TryGetDateTime() | bool TryGetDateTime(out DateTime value) |
TryGetDateTimeOffset | TryGetDateTimeOffset() | bool TryGetDateTimeOffset(out DateTimeOffset value) |
TryGetDecimal | TryGetDecimal() | bool TryGetDecimal(out decimal value) |
TryGetDouble | TryGetDouble() | bool TryGetDouble(out double value) |
TryGetGuid | TryGetGuid() | bool TryGetGuid(out Guid value) |
TryGetInt16 | TryGetInt16() | bool TryGetInt16(out short value) |
TryGetInt32 | TryGetInt32() | bool TryGetInt32(out int value) |
TryGetInt64 | TryGetInt64() | bool TryGetInt64(out long value) |
TryGetProperty | TryGetProperty(p1) | bool TryGetProperty(string propertyName, out JsonElement value)bool TryGetProperty(ReadOnlySpan<char> propertyName, out JsonElement value)bool TryGetProperty(ReadOnlySpan<byte> utf8PropertyName, out JsonElement value) |
TryGetSByte | TryGetSByte() | bool TryGetSByte(out sbyte value) |
TryGetSingle | TryGetSingle() | bool TryGetSingle(out float value) |
TryGetUInt16 | TryGetUInt16() | bool TryGetUInt16(out ushort value) |
TryGetUInt32 | TryGetUInt32() | bool TryGetUInt32(out uint value) |
TryGetUInt64 | TryGetUInt64() | bool TryGetUInt64(out ulong value) |
TryParseValue | TryParseValue(p1) | static bool TryParseValue(ref Utf8JsonReader reader, out JsonElement? element) |
ValueEquals | callMethod("ValueEquals",[p1]) | bool ValueEquals(string text)bool ValueEquals(ReadOnlySpan<byte> utf8Text)bool ValueEquals(ReadOnlySpan<char> text) |
WriteTo | WriteTo(p1) | void WriteTo(Utf8JsonWriter writer) |
JsonElementArrayEnumerator struct
System.Text.Json.JsonElement+ArrayEnumerator · assembly System.Text.Json
Implements: IEnumerable, IDisposable, IEnumerator
Properties and fields
| Name | Type | Access | In Ring |
|---|---|---|---|
Current | JsonElement | read | o.Current |
Methods
| Method | Ring call | .NET overloads |
|---|---|---|
Dispose | callMethod("Dispose",[]) | void Dispose() |
GetEnumerator | callMethod("GetEnumerator",[]) | JsonElement.ArrayEnumerator GetEnumerator() |
MoveNext | callMethod("MoveNext",[]) | bool MoveNext() |
Reset | callMethod("Reset",[]) | void Reset() |
JsonElementObjectEnumerator struct
System.Text.Json.JsonElement+ObjectEnumerator · assembly System.Text.Json
Implements: IEnumerable, IDisposable, IEnumerator
Properties and fields
| Name | Type | Access | In Ring |
|---|---|---|---|
Current | JsonProperty | read | o.Current |
Methods
| Method | Ring call | .NET overloads |
|---|---|---|
Dispose | callMethod("Dispose",[]) | void Dispose() |
GetEnumerator | callMethod("GetEnumerator",[]) | JsonElement.ObjectEnumerator GetEnumerator() |
MoveNext | callMethod("MoveNext",[]) | bool MoveNext() |
Reset | callMethod("Reset",[]) | void Reset() |
JsonEncodedText struct
System.Text.Json.JsonEncodedText · assembly System.Text.Json
Properties and fields
| Name | Type | Access | In Ring |
|---|---|---|---|
EncodedUtf8Bytes | ReadOnlySpan<byte> | read | o.EncodedUtf8Bytes |
Value | string | read | o.Value |
Methods
| Method | Ring call | .NET overloads |
|---|---|---|
Encode | Encode([ :value = …, :encoder = … ])Encode([ :utf8Value = …, :encoder = … ]) | static JsonEncodedText Encode(string value, JavaScriptEncoder encoder = …)static JsonEncodedText Encode(ReadOnlySpan<char> value, JavaScriptEncoder encoder = …)static JsonEncodedText Encode(ReadOnlySpan<byte> utf8Value, JavaScriptEncoder encoder = …) |
Equals | Equals(p1) | bool Equals(JsonEncodedText other)bool Equals(object obj) |
GetHashCode | callMethod("GetHashCode",[]) | int GetHashCode() |
ToString | callMethod("ToString",[]) | string ToString() |
JsonException class · extends Exception
System.Text.Json.JsonException · assembly System.Text.Json
Implements: ISerializable
Constructors
new JsonException(string message, string path, long? lineNumber, long? bytePositionInLine, Exception innerException) |
new JsonException(string message, string path, long? lineNumber, long? bytePositionInLine) |
new JsonException(string message, Exception innerException) |
new JsonException(string message) |
new JsonException() |
Ring: new JsonException(args) uses one constructor; the others are chosen by the parameter names: new JsonException().@New([ :param = value ]) or dnNew("JsonException",[ :param = value ]).
Properties and fields
| Name | Type | Access | In Ring |
|---|---|---|---|
LineNumber | long? | read | o.LineNumber |
BytePositionInLine | long? | read | o.BytePositionInLine |
Path | string | read | o.Path |
Message | string | read | o.getMessage() |
Methods
| Method | Ring call | .NET overloads |
|---|---|---|
GetObjectData | GetObjectData(p1,p2) | void GetObjectData(SerializationInfo info, StreamingContext context) |
Members of the base class are inherited.
JsonNamingPolicy class abstract
System.Text.Json.JsonNamingPolicy · assembly System.Text.Json
Properties and fields
| Name | Type | Access | In Ring |
|---|---|---|---|
CamelCase | JsonNamingPolicy | read · static | o.CamelCase |
SnakeCaseLower | JsonNamingPolicy | read · static | o.SnakeCaseLower |
SnakeCaseUpper | JsonNamingPolicy | read · static | o.SnakeCaseUpper |
KebabCaseLower | JsonNamingPolicy | read · static | o.KebabCaseLower |
KebabCaseUpper | JsonNamingPolicy | read · static | o.KebabCaseUpper |
Methods
| Method | Ring call | .NET overloads |
|---|---|---|
ConvertName | callMethod("ConvertName",[p1]) | string ConvertName(string name) |
JsonProperty struct
System.Text.Json.JsonProperty · assembly System.Text.Json
Properties and fields
| Name | Type | Access | In Ring |
|---|---|---|---|
Value | JsonElement | read | o.Value |
Name | string | read | o.Name |
Methods
| Method | Ring call | .NET overloads |
|---|---|---|
NameEquals | callMethod("NameEquals",[p1]) | bool NameEquals(string text)bool NameEquals(ReadOnlySpan<byte> utf8Text)bool NameEquals(ReadOnlySpan<char> text) |
ToString | callMethod("ToString",[]) | string ToString() |
WriteTo | WriteTo(p1) | void WriteTo(Utf8JsonWriter writer) |
JsonReaderOptions struct
System.Text.Json.JsonReaderOptions · assembly System.Text.Json
Properties and fields
| Name | Type | Access | In Ring |
|---|---|---|---|
CommentHandling | JsonCommentHandling | read, write | o.CommentHandling o.CommentHandling = v |
MaxDepth | int | read, write | o.MaxDepth o.MaxDepth = v |
AllowTrailingCommas | bool | read, write | o.AllowTrailingCommas o.AllowTrailingCommas = v |
AllowMultipleValues | bool | read, write | o.AllowMultipleValues o.AllowMultipleValues = v |
JsonReaderState struct
System.Text.Json.JsonReaderState · assembly System.Text.Json
Constructors
new JsonReaderState(JsonReaderOptions options = …) |
Ring: new JsonReaderState(args) uses one constructor; the others are chosen by the parameter names: new JsonReaderState().@New([ :param = value ]) or dnNew("JsonReaderState",[ :param = value ]).
Properties and fields
| Name | Type | Access | In Ring |
|---|---|---|---|
Options | JsonReaderOptions | read | o.Options |
JsonSerializer class static
System.Text.Json.JsonSerializer · assembly System.Text.Json
Properties and fields
| Name | Type | Access | In Ring |
|---|---|---|---|
IsReflectionEnabledByDefault | bool | read · static | o.IsReflectionEnabledByDefault |
Methods
| Method | Ring call | .NET overloads |
|---|---|---|
Deserialize | Deserialize([ :document = …, :options = … ])Deserialize([ :document = …, :jsonTypeInfo = … ])Deserialize([ :element = …, :options = … ])Deserialize([ :element = …, :jsonTypeInfo = … ]) | static TValue Deserialize<TValue>(JsonDocument document, JsonSerializerOptions options = …)static object Deserialize(JsonDocument document, Type returnType, JsonSerializerOptions options = …)static TValue Deserialize<TValue>(JsonDocument document, JsonTypeInfo<TValue> jsonTypeInfo)static object Deserialize(JsonDocument document, JsonTypeInfo jsonTypeInfo)static object Deserialize(JsonDocument document, Type returnType, JsonSerializerContext context)static TValue Deserialize<TValue>(JsonElement element, JsonSerializerOptions options = …)static object Deserialize(JsonElement element, Type returnType, JsonSerializerOptions options = …)static TValue Deserialize<TValue>(JsonElement element, JsonTypeInfo<TValue> jsonTypeInfo)static object Deserialize(JsonElement element, JsonTypeInfo jsonTypeInfo)static object Deserialize(JsonElement element, Type returnType, JsonSerializerContext context)static TValue Deserialize<TValue>(JsonNode node, JsonSerializerOptions options = …)static object Deserialize(JsonNode node, Type returnType, JsonSerializerOptions options = …)static TValue Deserialize<TValue>(JsonNode node, JsonTypeInfo<TValue> jsonTypeInfo)static object Deserialize(JsonNode node, JsonTypeInfo jsonTypeInfo)static object Deserialize(JsonNode node, Type returnType, JsonSerializerContext context)static TValue Deserialize<TValue>(ReadOnlySpan<byte> utf8Json, JsonSerializerOptions options = …)static object Deserialize(ReadOnlySpan<byte> utf8Json, Type returnType, JsonSerializerOptions options = …)static TValue Deserialize<TValue>(ReadOnlySpan<byte> utf8Json, JsonTypeInfo<TValue> jsonTypeInfo)static object Deserialize(ReadOnlySpan<byte> utf8Json, JsonTypeInfo jsonTypeInfo)static object Deserialize(ReadOnlySpan<byte> utf8Json, Type returnType, JsonSerializerContext context)static TValue Deserialize<TValue>(Stream utf8Json, JsonSerializerOptions options = …)static object Deserialize(Stream utf8Json, Type returnType, JsonSerializerOptions options = …)static TValue Deserialize<TValue>(Stream utf8Json, JsonTypeInfo<TValue> jsonTypeInfo)static object Deserialize(Stream utf8Json, JsonTypeInfo jsonTypeInfo)static object Deserialize(Stream utf8Json, Type returnType, JsonSerializerContext context)static TValue Deserialize<TValue>(string json, JsonSerializerOptions options = …)static TValue Deserialize<TValue>(ReadOnlySpan<char> json, JsonSerializerOptions options = …)static object Deserialize(string json, Type returnType, JsonSerializerOptions options = …)static object Deserialize(ReadOnlySpan<char> json, Type returnType, JsonSerializerOptions options = …)static TValue Deserialize<TValue>(string json, JsonTypeInfo<TValue> jsonTypeInfo)static TValue Deserialize<TValue>(ReadOnlySpan<char> json, JsonTypeInfo<TValue> jsonTypeInfo)static object Deserialize(string json, JsonTypeInfo jsonTypeInfo)static object Deserialize(ReadOnlySpan<char> json, JsonTypeInfo jsonTypeInfo)static object Deserialize(string json, Type returnType, JsonSerializerContext context)static object Deserialize(ReadOnlySpan<char> json, Type returnType, JsonSerializerContext context)static TValue Deserialize<TValue>(ref Utf8JsonReader reader, JsonSerializerOptions options = …)static object Deserialize(ref Utf8JsonReader reader, Type returnType, JsonSerializerOptions options = …)static TValue Deserialize<TValue>(ref Utf8JsonReader reader, JsonTypeInfo<TValue> jsonTypeInfo)static object Deserialize(ref Utf8JsonReader reader, JsonTypeInfo jsonTypeInfo)static object Deserialize(ref Utf8JsonReader reader, Type returnType, JsonSerializerContext context) |
DeserializeAsync | DeserializeAsync([ :utf8Json = …, :options = …, :cancellationToken = … ])DeserializeAsync([ :utf8Json = …, :jsonTypeInfo = …, :cancellationToken = … ])DeserializeAsync([ :utf8Json = …, :returnType = …, :options = …, :cancellationToken = … ])DeserializeAsync([ :utf8Json = …, :returnType = …, :context = …, :cancellationToken = … ]) | static ValueTask<TValue> DeserializeAsync<TValue>(Stream utf8Json, JsonSerializerOptions options = …, CancellationToken cancellationToken = …)static ValueTask<object> DeserializeAsync(Stream utf8Json, Type returnType, JsonSerializerOptions options = …, CancellationToken cancellationToken = …)static ValueTask<TValue> DeserializeAsync<TValue>(Stream utf8Json, JsonTypeInfo<TValue> jsonTypeInfo, CancellationToken cancellationToken = …)static ValueTask<object> DeserializeAsync(Stream utf8Json, JsonTypeInfo jsonTypeInfo, CancellationToken cancellationToken = …)static ValueTask<object> DeserializeAsync(Stream utf8Json, Type returnType, JsonSerializerContext context, CancellationToken cancellationToken = …) |
DeserializeAsyncEnumerable | DeserializeAsyncEnumerable([ :utf8Json = …, :options = …, :cancellationToken = … ])DeserializeAsyncEnumerable([ :utf8Json = …, :jsonTypeInfo = …, :cancellationToken = … ])DeserializeAsyncEnumerable([ :utf8Json = …, :topLevelValues = …, :options = …, :cancellationToken = … ])DeserializeAsyncEnumerable([ :utf8Json = …, :jsonTypeInfo = …, :topLevelValues = …, :cancellationToken = … ]) | static IAsyncEnumerable<TValue> DeserializeAsyncEnumerable<TValue>(Stream utf8Json, JsonSerializerOptions options = …, CancellationToken cancellationToken = …)static IAsyncEnumerable<TValue> DeserializeAsyncEnumerable<TValue>(Stream utf8Json, bool topLevelValues, JsonSerializerOptions options = …, CancellationToken cancellationToken = …)static IAsyncEnumerable<TValue> DeserializeAsyncEnumerable<TValue>(Stream utf8Json, JsonTypeInfo<TValue> jsonTypeInfo, CancellationToken cancellationToken = …)static IAsyncEnumerable<TValue> DeserializeAsyncEnumerable<TValue>(Stream utf8Json, JsonTypeInfo<TValue> jsonTypeInfo, bool topLevelValues, CancellationToken cancellationToken = …) |
Serialize | Serialize([ :value = …, :options = … ])Serialize([ :value = …, :jsonTypeInfo = … ])Serialize([ :utf8Json = …, :value = …, :options = … ])Serialize([ :utf8Json = …, :value = …, :jsonTypeInfo = … ]) | static void Serialize<TValue>(Stream utf8Json, TValue value, JsonSerializerOptions options = …)static void Serialize(Stream utf8Json, object value, Type inputType, JsonSerializerOptions options = …)static void Serialize<TValue>(Stream utf8Json, TValue value, JsonTypeInfo<TValue> jsonTypeInfo)static void Serialize(Stream utf8Json, object value, JsonTypeInfo jsonTypeInfo)static void Serialize(Stream utf8Json, object value, Type inputType, JsonSerializerContext context)static string Serialize<TValue>(TValue value, JsonSerializerOptions options = …)static string Serialize(object value, Type inputType, JsonSerializerOptions options = …)static string Serialize<TValue>(TValue value, JsonTypeInfo<TValue> jsonTypeInfo)static string Serialize(object value, JsonTypeInfo jsonTypeInfo)static string Serialize(object value, Type inputType, JsonSerializerContext context)static void Serialize<TValue>(Utf8JsonWriter writer, TValue value, JsonSerializerOptions options = …)static void Serialize(Utf8JsonWriter writer, object value, Type inputType, JsonSerializerOptions options = …)static void Serialize<TValue>(Utf8JsonWriter writer, TValue value, JsonTypeInfo<TValue> jsonTypeInfo)static void Serialize(Utf8JsonWriter writer, object value, JsonTypeInfo jsonTypeInfo)static void Serialize(Utf8JsonWriter writer, object value, Type inputType, JsonSerializerContext context) |
SerializeAsync | SerializeAsync([ :utf8Json = …, :value = …, :options = …, :cancellationToken = … ])SerializeAsync([ :utf8Json = …, :value = …, :jsonTypeInfo = …, :cancellationToken = … ])SerializeAsync([ :utf8Json = …, :value = …, :inputType = …, :options = …, :cancellationToken = … ])SerializeAsync([ :utf8Json = …, :value = …, :inputType = …, :context = …, :cancellationToken = … ]) | static Task SerializeAsync<TValue>(Stream utf8Json, TValue value, JsonSerializerOptions options = …, CancellationToken cancellationToken = …)static Task SerializeAsync(Stream utf8Json, object value, Type inputType, JsonSerializerOptions options = …, CancellationToken cancellationToken = …)static Task SerializeAsync<TValue>(Stream utf8Json, TValue value, JsonTypeInfo<TValue> jsonTypeInfo, CancellationToken cancellationToken = …)static Task SerializeAsync(Stream utf8Json, object value, JsonTypeInfo jsonTypeInfo, CancellationToken cancellationToken = …)static Task SerializeAsync(Stream utf8Json, object value, Type inputType, JsonSerializerContext context, CancellationToken cancellationToken = …)static Task SerializeAsync<TValue>(PipeWriter utf8Json, TValue value, JsonTypeInfo<TValue> jsonTypeInfo, CancellationToken cancellationToken = …)static Task SerializeAsync<TValue>(PipeWriter utf8Json, TValue value, JsonSerializerOptions options = …, CancellationToken cancellationToken = …)static Task SerializeAsync(PipeWriter utf8Json, object value, JsonTypeInfo jsonTypeInfo, CancellationToken cancellationToken = …)static Task SerializeAsync(PipeWriter utf8Json, object value, Type inputType, JsonSerializerContext context, CancellationToken cancellationToken = …)static Task SerializeAsync(PipeWriter utf8Json, object value, Type inputType, JsonSerializerOptions options = …, CancellationToken cancellationToken = …) |
SerializeToDocument | SerializeToDocument([ :value = …, :options = … ])SerializeToDocument([ :value = …, :jsonTypeInfo = … ])SerializeToDocument([ :value = …, :inputType = …, :options = … ])SerializeToDocument([ :value = …, :inputType = …, :context = … ]) | static JsonDocument SerializeToDocument<TValue>(TValue value, JsonSerializerOptions options = …)static JsonDocument SerializeToDocument(object value, Type inputType, JsonSerializerOptions options = …)static JsonDocument SerializeToDocument<TValue>(TValue value, JsonTypeInfo<TValue> jsonTypeInfo)static JsonDocument SerializeToDocument(object value, JsonTypeInfo jsonTypeInfo)static JsonDocument SerializeToDocument(object value, Type inputType, JsonSerializerContext context) |
SerializeToElement | SerializeToElement([ :value = …, :options = … ])SerializeToElement([ :value = …, :jsonTypeInfo = … ])SerializeToElement([ :value = …, :inputType = …, :options = … ])SerializeToElement([ :value = …, :inputType = …, :context = … ]) | static JsonElement SerializeToElement<TValue>(TValue value, JsonSerializerOptions options = …)static JsonElement SerializeToElement(object value, Type inputType, JsonSerializerOptions options = …)static JsonElement SerializeToElement<TValue>(TValue value, JsonTypeInfo<TValue> jsonTypeInfo)static JsonElement SerializeToElement(object value, JsonTypeInfo jsonTypeInfo)static JsonElement SerializeToElement(object value, Type inputType, JsonSerializerContext context) |
SerializeToNode | SerializeToNode([ :value = …, :options = … ])SerializeToNode([ :value = …, :jsonTypeInfo = … ])SerializeToNode([ :value = …, :inputType = …, :options = … ])SerializeToNode([ :value = …, :inputType = …, :context = … ]) | static JsonNode SerializeToNode<TValue>(TValue value, JsonSerializerOptions options = …)static JsonNode SerializeToNode(object value, Type inputType, JsonSerializerOptions options = …)static JsonNode SerializeToNode<TValue>(TValue value, JsonTypeInfo<TValue> jsonTypeInfo)static JsonNode SerializeToNode(object value, JsonTypeInfo jsonTypeInfo)static JsonNode SerializeToNode(object value, Type inputType, JsonSerializerContext context) |
SerializeToUtf8Bytes | SerializeToUtf8Bytes([ :value = …, :options = … ])SerializeToUtf8Bytes([ :value = …, :jsonTypeInfo = … ])SerializeToUtf8Bytes([ :value = …, :inputType = …, :options = … ])SerializeToUtf8Bytes([ :value = …, :inputType = …, :context = … ]) | static byte[] SerializeToUtf8Bytes<TValue>(TValue value, JsonSerializerOptions options = …)static byte[] SerializeToUtf8Bytes(object value, Type inputType, JsonSerializerOptions options = …)static byte[] SerializeToUtf8Bytes<TValue>(TValue value, JsonTypeInfo<TValue> jsonTypeInfo)static byte[] SerializeToUtf8Bytes(object value, JsonTypeInfo jsonTypeInfo)static byte[] SerializeToUtf8Bytes(object value, Type inputType, JsonSerializerContext context) |
JsonSerializerOptions class sealed
System.Text.Json.JsonSerializerOptions · assembly System.Text.Json
Constructors
new JsonSerializerOptions() |
new JsonSerializerOptions(JsonSerializerOptions options) |
new JsonSerializerOptions(JsonSerializerDefaults defaults) |
Ring: new JsonSerializerOptions(args) uses one constructor; the others are chosen by the parameter names: new JsonSerializerOptions().@New([ :param = value ]) or dnNew("JsonSerializerOptions",[ :param = value ]).
Properties and fields
| Name | Type | Access | In Ring |
|---|---|---|---|
Converters | IList<JsonConverter> | read | o.Converters |
TypeInfoResolver | IJsonTypeInfoResolver | read, write | o.TypeInfoResolver o.TypeInfoResolver = v |
TypeInfoResolverChain | IList<IJsonTypeInfoResolver> | read | o.TypeInfoResolverChain |
AllowOutOfOrderMetadataProperties | bool | read, write | o.AllowOutOfOrderMetadataProperties o.AllowOutOfOrderMetadataProperties = v |
AllowTrailingCommas | bool | read, write | o.AllowTrailingCommas o.AllowTrailingCommas = v |
DefaultBufferSize | int | read, write | o.DefaultBufferSize o.DefaultBufferSize = v |
Encoder | JavaScriptEncoder | read, write | o.Encoder o.Encoder = v |
DictionaryKeyPolicy | JsonNamingPolicy | read, write | o.DictionaryKeyPolicy o.DictionaryKeyPolicy = v |
IgnoreNullValues | bool | read, write | o.IgnoreNullValues o.IgnoreNullValues = v |
DefaultIgnoreCondition | JsonIgnoreCondition | read, write | o.DefaultIgnoreCondition o.DefaultIgnoreCondition = v |
NumberHandling | JsonNumberHandling | read, write | o.NumberHandling o.NumberHandling = v |
PreferredObjectCreationHandling | JsonObjectCreationHandling | read, write | o.PreferredObjectCreationHandling o.PreferredObjectCreationHandling = v |
IgnoreReadOnlyProperties | bool | read, write | o.IgnoreReadOnlyProperties o.IgnoreReadOnlyProperties = v |
IgnoreReadOnlyFields | bool | read, write | o.IgnoreReadOnlyFields o.IgnoreReadOnlyFields = v |
IncludeFields | bool | read, write | o.IncludeFields o.IncludeFields = v |
MaxDepth | int | read, write | o.MaxDepth o.MaxDepth = v |
PropertyNamingPolicy | JsonNamingPolicy | read, write | o.PropertyNamingPolicy o.PropertyNamingPolicy = v |
PropertyNameCaseInsensitive | bool | read, write | o.PropertyNameCaseInsensitive o.PropertyNameCaseInsensitive = v |
ReadCommentHandling | JsonCommentHandling | read, write | o.ReadCommentHandling o.ReadCommentHandling = v |
UnknownTypeHandling | JsonUnknownTypeHandling | read, write | o.UnknownTypeHandling o.UnknownTypeHandling = v |
UnmappedMemberHandling | JsonUnmappedMemberHandling | read, write | o.UnmappedMemberHandling o.UnmappedMemberHandling = v |
WriteIndented | bool | read, write | o.WriteIndented o.WriteIndented = v |
IndentCharacter | char | read, write | o.IndentCharacter o.IndentCharacter = v |
IndentSize | int | read, write | o.IndentSize o.IndentSize = v |
ReferenceHandler | ReferenceHandler | read, write | o.ReferenceHandler o.ReferenceHandler = v |
NewLine | string | read, write | o.NewLine o.NewLine = v |
RespectNullableAnnotations | bool | read, write | o.RespectNullableAnnotations o.RespectNullableAnnotations = v |
RespectRequiredConstructorParameters | bool | read, write | o.RespectRequiredConstructorParameters o.RespectRequiredConstructorParameters = v |
IsReadOnly | bool | read | o.IsReadOnly |
Default | JsonSerializerOptions | read · static | o.Default |
Web | JsonSerializerOptions | read · static | o.Web |
Methods
| Method | Ring call | .NET overloads |
|---|---|---|
AddContext | AddContext(NULL) | void AddContext<TContext>() |
GetConverter | callMethod("GetConverter",[p1]) | JsonConverter GetConverter(Type typeToConvert) |
GetTypeInfo | callMethod("GetTypeInfo",[p1]) | JsonTypeInfo GetTypeInfo(Type type) |
MakeReadOnly | callMethod("MakeReadOnly",[])callMethod("MakeReadOnly",[p1]) | void MakeReadOnly()void MakeReadOnly(bool populateMissingResolver) |
TryGetTypeInfo | TryGetTypeInfo(p1) | bool TryGetTypeInfo(Type type, out JsonTypeInfo typeInfo) |
JsonWriterOptions struct
System.Text.Json.JsonWriterOptions · assembly System.Text.Json
Properties and fields
| Name | Type | Access | In Ring |
|---|---|---|---|
Encoder | JavaScriptEncoder | read, write | o.Encoder o.Encoder = v |
Indented | bool | read, write | o.Indented o.Indented = v |
IndentCharacter | char | read, write | o.IndentCharacter o.IndentCharacter = v |
IndentSize | int | read, write | o.IndentSize o.IndentSize = v |
MaxDepth | int | read, write | o.MaxDepth o.MaxDepth = v |
SkipValidation | bool | read, write | o.SkipValidation o.SkipValidation = v |
NewLine | string | read, write | o.NewLine o.NewLine = v |
Utf8JsonWriter class sealed
System.Text.Json.Utf8JsonWriter · assembly System.Text.Json
Implements: IDisposable, IAsyncDisposable
Constructors
new Utf8JsonWriter(IBufferWriter<byte> bufferWriter, JsonWriterOptions options = …) |
new Utf8JsonWriter(Stream utf8Json, JsonWriterOptions options = …) |
Ring: new Utf8JsonWriter(args) uses one constructor; the others are chosen by the parameter names: new Utf8JsonWriter().@New([ :param = value ]) or dnNew("Utf8JsonWriter",[ :param = value ]).
Properties and fields
| Name | Type | Access | In Ring |
|---|---|---|---|
BytesPending | int | read | o.BytesPending |
BytesCommitted | long | read | o.BytesCommitted |
Options | JsonWriterOptions | read | o.Options |
CurrentDepth | int | read | o.CurrentDepth |
Methods
| Method | Ring call | .NET overloads |
|---|---|---|
Dispose | callMethod("Dispose",[]) | void Dispose() |
DisposeAsync | callMethod("DisposeAsync",[]) | ValueTask DisposeAsync() |
Flush | callMethod("Flush",[]) | void Flush() |
FlushAsync | FlushAsync(value)FlushAsync([ :cancellationToken = … ]) | Task FlushAsync(CancellationToken cancellationToken = …) |
Reset | callMethod("Reset",[])callMethod("Reset",[p1]) | void Reset()void Reset(Stream utf8Json)void Reset(IBufferWriter<byte> bufferWriter) |
WriteBase64String | WriteBase64String(p1,p2) | void WriteBase64String(JsonEncodedText propertyName, ReadOnlySpan<byte> bytes)void WriteBase64String(string propertyName, ReadOnlySpan<byte> bytes)void WriteBase64String(ReadOnlySpan<char> propertyName, ReadOnlySpan<byte> bytes)void WriteBase64String(ReadOnlySpan<byte> utf8PropertyName, ReadOnlySpan<byte> bytes) |
WriteBase64StringValue | WriteBase64StringValue(p1) | void WriteBase64StringValue(ReadOnlySpan<byte> bytes) |
WriteBoolean | WriteBoolean(p1,p2) | void WriteBoolean(JsonEncodedText propertyName, bool value)void WriteBoolean(string propertyName, bool value)void WriteBoolean(ReadOnlySpan<char> propertyName, bool value)void WriteBoolean(ReadOnlySpan<byte> utf8PropertyName, bool value) |
WriteBooleanValue | callMethod("WriteBooleanValue",[p1]) | void WriteBooleanValue(bool value) |
WriteCommentValue | callMethod("WriteCommentValue",[p1]) | void WriteCommentValue(string value)void WriteCommentValue(ReadOnlySpan<char> value)void WriteCommentValue(ReadOnlySpan<byte> utf8Value) |
WriteEndArray | callMethod("WriteEndArray",[]) | void WriteEndArray() |
WriteEndObject | callMethod("WriteEndObject",[]) | void WriteEndObject() |
WriteNull | WriteNull(p1) | void WriteNull(JsonEncodedText propertyName)void WriteNull(string propertyName)void WriteNull(ReadOnlySpan<char> propertyName)void WriteNull(ReadOnlySpan<byte> utf8PropertyName) |
WriteNullValue | callMethod("WriteNullValue",[]) | void WriteNullValue() |
WriteNumber | WriteNumber(p1,p2) | void WriteNumber(JsonEncodedText propertyName, decimal value)void WriteNumber(string propertyName, decimal value)void WriteNumber(ReadOnlySpan<char> propertyName, decimal value)void WriteNumber(ReadOnlySpan<byte> utf8PropertyName, decimal value)void WriteNumber(JsonEncodedText propertyName, double value)void WriteNumber(string propertyName, double value)void WriteNumber(ReadOnlySpan<char> propertyName, double value)void WriteNumber(ReadOnlySpan<byte> utf8PropertyName, double value)void WriteNumber(JsonEncodedText propertyName, float value)void WriteNumber(string propertyName, float value)void WriteNumber(ReadOnlySpan<char> propertyName, float value)void WriteNumber(ReadOnlySpan<byte> utf8PropertyName, float value)void WriteNumber(JsonEncodedText propertyName, long value)void WriteNumber(string propertyName, long value)void WriteNumber(ReadOnlySpan<char> propertyName, long value)void WriteNumber(ReadOnlySpan<byte> utf8PropertyName, long value)void WriteNumber(JsonEncodedText propertyName, int value)void WriteNumber(string propertyName, int value)void WriteNumber(ReadOnlySpan<char> propertyName, int value)void WriteNumber(ReadOnlySpan<byte> utf8PropertyName, int value)void WriteNumber(JsonEncodedText propertyName, ulong value)void WriteNumber(string propertyName, ulong value)void WriteNumber(ReadOnlySpan<char> propertyName, ulong value)void WriteNumber(ReadOnlySpan<byte> utf8PropertyName, ulong value)void WriteNumber(JsonEncodedText propertyName, uint value)void WriteNumber(string propertyName, uint value)void WriteNumber(ReadOnlySpan<char> propertyName, uint value)void WriteNumber(ReadOnlySpan<byte> utf8PropertyName, uint value) |
WriteNumberValue | WriteNumberValue(p1) | void WriteNumberValue(decimal value)void WriteNumberValue(double value)void WriteNumberValue(float value)void WriteNumberValue(int value)void WriteNumberValue(long value)void WriteNumberValue(uint value)void WriteNumberValue(ulong value) |
WritePropertyName | WritePropertyName(p1) | void WritePropertyName(JsonEncodedText propertyName)void WritePropertyName(string propertyName)void WritePropertyName(ReadOnlySpan<char> propertyName)void WritePropertyName(ReadOnlySpan<byte> utf8PropertyName) |
WriteRawValue | callMethod("WriteRawValue",[p1,p2]) | void WriteRawValue(string json, bool skipInputValidation = …)void WriteRawValue(ReadOnlySpan<char> json, bool skipInputValidation = …)void WriteRawValue(ReadOnlySpan<byte> utf8Json, bool skipInputValidation = …)void WriteRawValue(ReadOnlySequence<byte> utf8Json, bool skipInputValidation = …) |
WriteStartArray | callMethod("WriteStartArray",[])callMethod("WriteStartArray",[p1]) | void WriteStartArray()void WriteStartArray(JsonEncodedText propertyName)void WriteStartArray(ReadOnlySpan<byte> utf8PropertyName)void WriteStartArray(string propertyName)void WriteStartArray(ReadOnlySpan<char> propertyName) |
WriteStartObject | callMethod("WriteStartObject",[])callMethod("WriteStartObject",[p1]) | void WriteStartObject()void WriteStartObject(JsonEncodedText propertyName)void WriteStartObject(ReadOnlySpan<byte> utf8PropertyName)void WriteStartObject(string propertyName)void WriteStartObject(ReadOnlySpan<char> propertyName) |
WriteString | WriteString(p1,p2) | void WriteString(JsonEncodedText propertyName, DateTime value)void WriteString(string propertyName, DateTime value)void WriteString(ReadOnlySpan<char> propertyName, DateTime value)void WriteString(ReadOnlySpan<byte> utf8PropertyName, DateTime value)void WriteString(JsonEncodedText propertyName, DateTimeOffset value)void WriteString(string propertyName, DateTimeOffset value)void WriteString(ReadOnlySpan<char> propertyName, DateTimeOffset value)void WriteString(ReadOnlySpan<byte> utf8PropertyName, DateTimeOffset value)void WriteString(JsonEncodedText propertyName, Guid value)void WriteString(string propertyName, Guid value)void WriteString(ReadOnlySpan<char> propertyName, Guid value)void WriteString(ReadOnlySpan<byte> utf8PropertyName, Guid value)void WriteString(JsonEncodedText propertyName, JsonEncodedText value)void WriteString(string propertyName, JsonEncodedText value)void WriteString(string propertyName, string value)void WriteString(ReadOnlySpan<char> propertyName, ReadOnlySpan<char> value)void WriteString(ReadOnlySpan<byte> utf8PropertyName, ReadOnlySpan<byte> utf8Value)void WriteString(JsonEncodedText propertyName, string value)void WriteString(JsonEncodedText propertyName, ReadOnlySpan<char> value)void WriteString(string propertyName, ReadOnlySpan<char> value)void WriteString(ReadOnlySpan<byte> utf8PropertyName, ReadOnlySpan<char> value)void WriteString(JsonEncodedText propertyName, ReadOnlySpan<byte> utf8Value)void WriteString(string propertyName, ReadOnlySpan<byte> utf8Value)void WriteString(ReadOnlySpan<char> propertyName, ReadOnlySpan<byte> utf8Value)void WriteString(ReadOnlySpan<char> propertyName, JsonEncodedText value)void WriteString(ReadOnlySpan<char> propertyName, string value)void WriteString(ReadOnlySpan<byte> utf8PropertyName, JsonEncodedText value)void WriteString(ReadOnlySpan<byte> utf8PropertyName, string value) |
WriteStringValue | WriteStringValue(p1) | void WriteStringValue(DateTime value)void WriteStringValue(DateTimeOffset value)void WriteStringValue(Guid value)void WriteStringValue(JsonEncodedText value)void WriteStringValue(string value)void WriteStringValue(ReadOnlySpan<char> value)void WriteStringValue(ReadOnlySpan<byte> utf8Value) |