Interface IJsSerializer
- Namespace
- SunamoInterfaces.Interfaces
- Assembly
- SunamoInterfaces.dll
Interface for JSON serialization and deserialization operations.
public interface IJsSerializer
- Extension Methods
Methods
Deserialize(string, Type)
Deserializes JSON to an object of the specified type.
object Deserialize(string json, Type targetType)
Parameters
Returns
- object
The deserialized object.
Serialize(object)
Serializes an object to JSON.
string Serialize(object value)
Parameters
valueobjectThe object to serialize.
Returns
- string
The JSON string representation.
Serialize(object, bool, JsonSerializerSettings)
Serializes an object to JSON with formatting options.
string Serialize(object value, bool isIndented, JsonSerializerSettings jsonSerializerSettings)
Parameters
valueobjectThe object to serialize.
isIndentedboolWhether to indent the output.
jsonSerializerSettingsJsonSerializerSettingsThe serializer settings to use.
Returns
- string
The JSON string representation.
SerializeT<T>(T)
Serializes a strongly-typed object to JSON.
string SerializeT<T>(T value)
Parameters
valueTThe object to serialize.
Returns
- string
The JSON string representation.
Type Parameters
TThe type of the object to serialize.
SerializeT<T>(T, bool, JsonSerializerSettings)
Serializes a strongly-typed object to JSON with formatting options.
string SerializeT<T>(T value, bool isIndented, JsonSerializerSettings jsonSerializerSettings)
Parameters
valueTThe object to serialize.
isIndentedboolWhether to indent the output.
jsonSerializerSettingsJsonSerializerSettingsThe serializer settings to use.
Returns
- string
The JSON string representation.
Type Parameters
TThe type of the object to serialize.