Class CoreJson
A static helper class that serializes and deserializes JSON with the Artemis Core JSON settings
public static class CoreJson
- Inheritance
-
objectCoreJson
Methods
Deserialize<T>(string)
Deserializes the JSON to the specified .NET type.
public static T Deserialize<T>(string value)
Parameters
valuestringThe JSON to deserialize.
Returns
- T
The deserialized object from the JSON string.
Type Parameters
TThe type of the object to deserialize to.
GetJsonSerializerOptions()
Gets a copy of the JSON serializer options used by Artemis Core
public static JsonSerializerOptions GetJsonSerializerOptions()
Returns
- JsonSerializerOptions
A copy of the JSON serializer options used by Artemis Core
Serialize(object?)
Serializes the specified object to a JSON string.
public static string Serialize(object? value)
Parameters
valueobjectThe object to serialize.
Returns
- string
A JSON string representation of the object.