Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
System.Text.Json.JsonSerializer Class Reference

Static Public Member Functions

static ? TValue Deserialize< TValue > (this JsonDocument document, JsonSerializerOptions? options=null)
 
static ? object Deserialize (this JsonDocument document, Type returnType, JsonSerializerOptions? options=null)
 
static ? TValue Deserialize< TValue > (this JsonDocument document, JsonTypeInfo< TValue > jsonTypeInfo)
 
static ? object Deserialize (this JsonDocument document, Type returnType, JsonSerializerContext context)
 
static ? TValue Deserialize< TValue > (this JsonElement element, JsonSerializerOptions? options=null)
 
static ? object Deserialize (this JsonElement element, Type returnType, JsonSerializerOptions? options=null)
 
static ? TValue Deserialize< TValue > (this JsonElement element, JsonTypeInfo< TValue > jsonTypeInfo)
 
static ? object Deserialize (this JsonElement element, Type returnType, JsonSerializerContext context)
 
static ? TValue Deserialize< TValue > (this JsonNode? node, JsonSerializerOptions? options=null)
 
static ? object Deserialize (this JsonNode? node, Type returnType, JsonSerializerOptions? options=null)
 
static ? TValue Deserialize< TValue > (this JsonNode? node, JsonTypeInfo< TValue > jsonTypeInfo)
 
static ? object Deserialize (this JsonNode? node, Type returnType, JsonSerializerContext context)
 
static JsonDocument SerializeToDocument< TValue > (TValue value, JsonSerializerOptions? options=null)
 
static JsonDocument SerializeToDocument (object? value, Type inputType, JsonSerializerOptions? options=null)
 
static JsonDocument SerializeToDocument< TValue > (TValue value, JsonTypeInfo< TValue > jsonTypeInfo)
 
static JsonDocument SerializeToDocument (object? value, Type inputType, JsonSerializerContext context)
 
static JsonElement SerializeToElement< TValue > (TValue value, JsonSerializerOptions? options=null)
 
static JsonElement SerializeToElement (object? value, Type inputType, JsonSerializerOptions? options=null)
 
static JsonElement SerializeToElement< TValue > (TValue value, JsonTypeInfo< TValue > jsonTypeInfo)
 
static JsonElement SerializeToElement (object? value, Type inputType, JsonSerializerContext context)
 
static ? JsonNode SerializeToNode< TValue > (TValue value, JsonSerializerOptions? options=null)
 
static ? JsonNode SerializeToNode (object? value, Type inputType, JsonSerializerOptions? options=null)
 
static ? JsonNode SerializeToNode< TValue > (TValue value, JsonTypeInfo< TValue > jsonTypeInfo)
 
static ? JsonNode SerializeToNode (object? value, Type inputType, JsonSerializerContext context)
 
static ? TValue Deserialize< TValue > (ReadOnlySpan< byte > utf8Json, JsonSerializerOptions? options=null)
 
static ? object Deserialize (ReadOnlySpan< byte > utf8Json, Type returnType, JsonSerializerOptions? options=null)
 
static ? TValue Deserialize< TValue > (ReadOnlySpan< byte > utf8Json, JsonTypeInfo< TValue > jsonTypeInfo)
 
static ? object Deserialize (ReadOnlySpan< byte > utf8Json, Type returnType, JsonSerializerContext context)
 
static ValueTask< TValue?> DeserializeAsync< TValue > (Stream utf8Json, JsonSerializerOptions? options=null, CancellationToken cancellationToken=default(CancellationToken))
 
static ? TValue Deserialize< TValue > (Stream utf8Json, JsonSerializerOptions? options=null)
 
static ValueTask< object?> DeserializeAsync (Stream utf8Json, Type returnType, JsonSerializerOptions? options=null, CancellationToken cancellationToken=default(CancellationToken))
 
static ? object Deserialize (Stream utf8Json, Type returnType, JsonSerializerOptions? options=null)
 
static ValueTask< TValue?> DeserializeAsync< TValue > (Stream utf8Json, JsonTypeInfo< TValue > jsonTypeInfo, CancellationToken cancellationToken=default(CancellationToken))
 
static ? TValue Deserialize< TValue > (Stream utf8Json, JsonTypeInfo< TValue > jsonTypeInfo)
 
static ValueTask< object?> DeserializeAsync (Stream utf8Json, Type returnType, JsonSerializerContext context, CancellationToken cancellationToken=default(CancellationToken))
 
static ? object Deserialize (Stream utf8Json, Type returnType, JsonSerializerContext context)
 
static IAsyncEnumerable< TValue?> DeserializeAsyncEnumerable< TValue > (Stream utf8Json, JsonSerializerOptions? options=null, CancellationToken cancellationToken=default(CancellationToken))
 
static ? TValue Deserialize< TValue > (string json, JsonSerializerOptions? options=null)
 
static ? TValue Deserialize< TValue > (ReadOnlySpan< char > json, JsonSerializerOptions? options=null)
 
static ? object Deserialize (string json, Type returnType, JsonSerializerOptions? options=null)
 
static ? object Deserialize (ReadOnlySpan< char > json, Type returnType, JsonSerializerOptions? options=null)
 
static ? TValue Deserialize< TValue > (string json, JsonTypeInfo< TValue > jsonTypeInfo)
 
static ? TValue Deserialize< TValue > (ReadOnlySpan< char > json, JsonTypeInfo< TValue > 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=null)
 
static ? object Deserialize (ref Utf8JsonReader reader, Type returnType, JsonSerializerOptions? options=null)
 
static ? TValue Deserialize< TValue > (ref Utf8JsonReader reader, JsonTypeInfo< TValue > jsonTypeInfo)
 
static ? object Deserialize (ref Utf8JsonReader reader, Type returnType, JsonSerializerContext context)
 
static byte[] SerializeToUtf8Bytes< TValue > (TValue value, JsonSerializerOptions? options=null)
 
static byte[] SerializeToUtf8Bytes (object? value, Type inputType, JsonSerializerOptions? options=null)
 
static byte[] SerializeToUtf8Bytes< TValue > (TValue value, JsonTypeInfo< TValue > jsonTypeInfo)
 
static byte[] SerializeToUtf8Bytes (object? value, Type inputType, JsonSerializerContext context)
 
static Task SerializeAsync< TValue > (Stream utf8Json, TValue value, JsonSerializerOptions? options=null, CancellationToken cancellationToken=default(CancellationToken))
 
static void Serialize< TValue > (Stream utf8Json, TValue value, JsonSerializerOptions? options=null)
 
static Task SerializeAsync (Stream utf8Json, object? value, Type inputType, JsonSerializerOptions? options=null, CancellationToken cancellationToken=default(CancellationToken))
 
static void Serialize (Stream utf8Json, object? value, Type inputType, JsonSerializerOptions? options=null)
 
static Task SerializeAsync< TValue > (Stream utf8Json, TValue value, JsonTypeInfo< TValue > jsonTypeInfo, CancellationToken cancellationToken=default(CancellationToken))
 
static void Serialize< TValue > (Stream utf8Json, TValue value, JsonTypeInfo< TValue > jsonTypeInfo)
 
static Task SerializeAsync (Stream utf8Json, object? value, Type inputType, JsonSerializerContext context, CancellationToken cancellationToken=default(CancellationToken))
 
static void Serialize (Stream utf8Json, object? value, Type inputType, JsonSerializerContext context)
 
static string Serialize< TValue > (TValue value, JsonSerializerOptions? options=null)
 
static string Serialize (object? value, Type inputType, JsonSerializerOptions? options=null)
 
static string Serialize< TValue > (TValue value, JsonTypeInfo< TValue > jsonTypeInfo)
 
static string Serialize (object? value, Type inputType, JsonSerializerContext context)
 
static void Serialize< TValue > (Utf8JsonWriter writer, TValue value, JsonSerializerOptions? options=null)
 
static void Serialize (Utf8JsonWriter writer, object? value, Type inputType, JsonSerializerOptions? options=null)
 
static void Serialize< TValue > (Utf8JsonWriter writer, TValue value, JsonTypeInfo< TValue > jsonTypeInfo)
 
static void Serialize (Utf8JsonWriter writer, object? value, Type inputType, JsonSerializerContext context)
 

Static Package Functions

static bool IsValidNumberHandlingValue (JsonNumberHandling handling)
 
static bool ResolveMetadataForJsonObject< T > (ref Utf8JsonReader reader, ref ReadStack state, JsonSerializerOptions options)
 
static bool ResolveMetadataForJsonArray< T > (ref Utf8JsonReader reader, ref ReadStack state, JsonSerializerOptions options)
 
static MetadataPropertyName GetMetadataPropertyName (ReadOnlySpan< byte > propertyName)
 
static bool TryGetReferenceFromJsonElement (ref ReadStack state, JsonElement element, out object referenceValue)
 
static JsonPropertyInfo LookupProperty (object obj, ReadOnlySpan< byte > unescapedPropertyName, ref ReadStack state, JsonSerializerOptions options, out bool useExtensionProperty, bool createExtensionProperty=true)
 
static ReadOnlySpan< byte > GetPropertyName (ref ReadStack state, ref Utf8JsonReader reader, JsonSerializerOptions options)
 
static void CreateDataExtensionProperty (object obj, JsonPropertyInfo jsonPropertyInfo, JsonSerializerOptions options)
 
static async ValueTask< TValue > ReadAllAsync< TValue > (Stream utf8Json, JsonTypeInfo jsonTypeInfo, CancellationToken cancellationToken)
 
static TValue ReadAll< TValue > (Stream utf8Json, JsonTypeInfo jsonTypeInfo)
 
static async ValueTask< ReadBufferStateReadFromStreamAsync (Stream utf8Json, ReadBufferState bufferState, CancellationToken cancellationToken)
 
static ReadBufferState ReadFromStream (Stream utf8Json, ReadBufferState bufferState)
 
static TValue ContinueDeserialize< TValue > (ref ReadBufferState bufferState, ref JsonReaderState jsonReaderState, ref ReadStack readStack, JsonConverter converter, JsonSerializerOptions options)
 
static MetadataPropertyName WriteReferenceForObject (JsonConverter jsonConverter, object currentValue, ref WriteStack state, Utf8JsonWriter writer)
 
static MetadataPropertyName WriteReferenceForCollection (JsonConverter jsonConverter, object currentValue, ref WriteStack state, Utf8JsonWriter writer)
 
static bool TryWriteReferenceForBoxedStruct (object currentValue, ref WriteStack state, Utf8JsonWriter writer)
 

Static Package Attributes

static readonly byte[] s_idPropertyName = new byte[3] { 36, 105, 100 }
 
static readonly byte[] s_refPropertyName = new byte[4] { 36, 114, 101, 102 }
 
static readonly byte[] s_valuesPropertyName = new byte[7] { 36, 118, 97, 108, 117, 101, 115 }
 
static readonly JsonEncodedText s_metadataId = JsonEncodedText.Encode("$id")
 
static readonly JsonEncodedText s_metadataRef = JsonEncodedText.Encode("$ref")
 
static readonly JsonEncodedText s_metadataValues = JsonEncodedText.Encode("$values")
 

Static Private Member Functions

static TValue ReadDocument< TValue > (JsonDocument document, JsonTypeInfo jsonTypeInfo)
 
static TValue ReadUsingMetadata< TValue > (JsonElement element, JsonTypeInfo jsonTypeInfo)
 
static TValue ReadNode< TValue > (JsonNode node, JsonTypeInfo jsonTypeInfo)
 
static JsonDocument WriteDocumentUsingGeneratedSerializer< TValue > (in TValue value, JsonTypeInfo jsonTypeInfo)
 
static JsonDocument WriteDocumentUsingSerializer< TValue > (in TValue value, JsonTypeInfo jsonTypeInfo)
 
static JsonElement WriteElementUsingGeneratedSerializer< TValue > (in TValue value, JsonTypeInfo jsonTypeInfo)
 
static JsonElement WriteElementUsingSerializer< TValue > (in TValue value, JsonTypeInfo jsonTypeInfo)
 
static JsonNode WriteNodeUsingGeneratedSerializer< TValue > (in TValue value, JsonTypeInfo jsonTypeInfo)
 
static JsonNode WriteNodeUsingSerializer< TValue > (in TValue value, JsonTypeInfo jsonTypeInfo)
 
static JsonTypeInfo GetTypeInfo (JsonSerializerOptions options, Type runtimeType)
 
static JsonTypeInfo GetTypeInfo (JsonSerializerContext context, Type type)
 
static bool TryReadAheadMetadataAndSetState (ref Utf8JsonReader reader, ref ReadStack state, StackFrameObjectState nextState)
 
static void ValidateValueIsCorrectType< T > (object value, string referenceId)
 
static TValue ReadCore< TValue > (JsonConverter jsonConverter, ref Utf8JsonReader reader, JsonSerializerOptions options, ref ReadStack state)
 
static TValue ReadFromSpan< TValue > (ReadOnlySpan< byte > utf8Json, JsonTypeInfo jsonTypeInfo, int? actualByteCount=null)
 
static JsonTypeInfo CreateQueueJsonTypeInfo< TValue > (JsonConverter queueConverter, JsonSerializerOptions queueOptions)
 
static TValue ReadAllUsingOptions< TValue > (Stream utf8Json, Type returnType, JsonSerializerOptions options)
 
static TValue ReadCore< TValue > (ref JsonReaderState readerState, bool isFinalBlock, ReadOnlySpan< byte > buffer, JsonSerializerOptions options, ref ReadStack state, JsonConverter converterBase)
 
static TValue ReadFromSpan< TValue > (ReadOnlySpan< char > json, JsonTypeInfo jsonTypeInfo)
 
static TValue Read< TValue > (ref Utf8JsonReader reader, JsonTypeInfo jsonTypeInfo)
 
static byte[] WriteBytesUsingGeneratedSerializer< TValue > (in TValue value, JsonTypeInfo jsonTypeInfo)
 
static byte[] WriteBytesUsingSerializer< TValue > (in TValue value, JsonTypeInfo jsonTypeInfo)
 
static bool WriteCore< TValue > (JsonConverter jsonConverter, Utf8JsonWriter writer, in TValue value, JsonSerializerOptions options, ref WriteStack state)
 
static void WriteUsingGeneratedSerializer< TValue > (Utf8JsonWriter writer, in TValue value, JsonTypeInfo jsonTypeInfo)
 
static void WriteUsingSerializer< TValue > (Utf8JsonWriter writer, in TValue value, JsonTypeInfo jsonTypeInfo)
 
static Type GetRuntimeType< TValue > (in TValue value)
 
static Type GetRuntimeTypeAndValidateInputType (object value, Type inputType)
 
static async Task WriteStreamAsync< TValue > (Stream utf8Json, TValue value, JsonTypeInfo jsonTypeInfo, CancellationToken cancellationToken)
 
static void WriteStream< TValue > (Stream utf8Json, in TValue value, JsonTypeInfo jsonTypeInfo)
 
static string WriteStringUsingGeneratedSerializer< TValue > (in TValue value, JsonTypeInfo jsonTypeInfo)
 
static string WriteStringUsingSerializer< TValue > (in TValue value, JsonTypeInfo jsonTypeInfo)
 

Detailed Description

Definition at line 15 of file JsonSerializer.cs.


The documentation for this class was generated from the following file: