Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Create< T >() [2/2]

static ? JsonValue System.Text.Json.Nodes.JsonValue< TValue >.Create< T > ( T? value,
JsonTypeInfo< T > jsonTypeInfo,
JsonNodeOptions? options = null )
inlinestaticinherited

Definition at line 304 of file JsonValue.cs.

305 {
306 if (jsonTypeInfo == null)
307 {
308 throw new ArgumentNullException("jsonTypeInfo");
309 }
310 if (value == null)
311 {
312 return null;
313 }
314 if (value is JsonElement)
315 {
316 object obj = value;
317 JsonElement element = (JsonElement)((obj is JsonElement) ? obj : null);
318 if (element.ValueKind == JsonValueKind.Null)
319 {
320 return null;
321 }
323 }
325 }
static void VerifyJsonElementIsNotArrayOrObject(ref JsonElement element)
Definition JsonValue.cs:337

References System.Text.Json.Dictionary, System.obj, System.options, System.value, System.Text.Json.JsonElement.ValueKind, and System.Text.Json.Nodes.JsonValue< TValue >.VerifyJsonElementIsNotArrayOrObject().