Class SaveSystemJsonSerializer
The Save System JsonSerializer wrapper.
Inheritance
Inherited Members
Namespace: Bayat.SaveSystem
Assembly: Bayat.SaveSystem.Runtime.dll
Syntax
public class SaveSystemJsonSerializer
Constructors
| Improve this Doc View SourceSaveSystemJsonSerializer(JsonSerializer)
Initializes a new instance of SaveSystemJsonSerializer using the specified json serializer.
Declaration
public SaveSystemJsonSerializer(JsonSerializer jsonSerializer)
Parameters
Type | Name | Description |
---|---|---|
JsonSerializer | jsonSerializer | The json serializer |
SaveSystemJsonSerializer(JsonSerializerSettings)
Initializes a new instance of SaveSystemJsonSerializer using the specified settings.
Declaration
public SaveSystemJsonSerializer(JsonSerializerSettings settings)
Parameters
Type | Name | Description |
---|---|---|
JsonSerializerSettings | settings | The json serializer settings |
Fields
| Improve this Doc View SourcejsonSerializer
Declaration
protected JsonSerializer jsonSerializer
Field Value
Type | Description |
---|---|
JsonSerializer |
Properties
| Improve this Doc View SourceJsonSerializer
The internal json serializer.
Declaration
public virtual JsonSerializer JsonSerializer { get; }
Property Value
Type | Description |
---|---|
JsonSerializer |
Methods
| Improve this Doc View SourceCreateDefault()
Initializes a new instance of SaveSystemJsonSerializer with default configuration.
Declaration
public static SaveSystemJsonSerializer CreateDefault()
Returns
Type | Description |
---|---|
SaveSystemJsonSerializer |
Deserialize(JsonReader, Type)
Deserializes the object from the json reader.
Declaration
public object Deserialize(JsonReader jsonReader, Type objectType)
Parameters
Type | Name | Description |
---|---|---|
JsonReader | jsonReader | The json reader |
System.Type | objectType | The object type |
Returns
Type | Description |
---|---|
System.Object | The deserialized object |
Deserialize(Stream, Type)
Deserializes the object from the stream.
Declaration
public object Deserialize(Stream stream, Type objectType)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | The stream |
System.Type | objectType | The object type |
Returns
Type | Description |
---|---|
System.Object | The deserialized object |
Deserialize(TextReader, Type)
Deserializes the object from the text reader.
Declaration
public object Deserialize(TextReader textReader, Type objectType)
Parameters
Type | Name | Description |
---|---|---|
System.IO.TextReader | textReader | The text reader |
System.Type | objectType | The object type |
Returns
Type | Description |
---|---|
System.Object | The deserialized object |
Deserialize(String, Type)
Deserializes the object from json string.
Declaration
public object Deserialize(string json, Type objectType)
Parameters
Type | Name | Description |
---|---|---|
System.String | json | The json string |
System.Type | objectType | The object type |
Returns
Type | Description |
---|---|
System.Object | The deserialized object |
DeserializeInto(JsonReader, Object)
Deserializes the data into the object from the json reader.
Declaration
public object DeserializeInto(JsonReader jsonReader, object target)
Parameters
Type | Name | Description |
---|---|---|
JsonReader | jsonReader | The json reader |
System.Object | target | The target object to deserialize the data into |
Returns
Type | Description |
---|---|
System.Object | The populated target object |
DeserializeInto(Stream, Object)
Deserializes the data into the object from the json reader.
Declaration
public object DeserializeInto(Stream stream, object target)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | The stream |
System.Object | target | The target object to deserialize the data into |
Returns
Type | Description |
---|---|
System.Object | The populated target object |
DeserializeInto(TextReader, Object)
Deserializes the data into the object from the json reader.
Declaration
public object DeserializeInto(TextReader textReader, object target)
Parameters
Type | Name | Description |
---|---|---|
System.IO.TextReader | textReader | The text reader |
System.Object | target | The target object to deserialize the data into |
Returns
Type | Description |
---|---|
System.Object | The populated target object |
DeserializeInto(String, Object)
Deserializes the data into the object from the json reader.
Declaration
public object DeserializeInto(string json, object target)
Parameters
Type | Name | Description |
---|---|---|
System.String | json | The json string |
System.Object | target | The target object to deserialize the data into |
Returns
Type | Description |
---|---|
System.Object | The populated target object |
Serialize(JsonWriter, Object)
Serializes the value to the json writer.
Declaration
public void Serialize(JsonWriter jsonWriter, object value)
Parameters
Type | Name | Description |
---|---|---|
JsonWriter | jsonWriter | The json writer |
System.Object | value | The value |
Serialize(Stream, Object)
Serializes the value to the stream.
Declaration
public void Serialize(Stream stream, object value)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | The stream |
System.Object | value | The value |
Serialize(TextWriter, Object)
Serializes the value to the text writer.
Declaration
public void Serialize(TextWriter textWriter, object value)
Parameters
Type | Name | Description |
---|---|---|
System.IO.TextWriter | textWriter | The text writer |
System.Object | value | The value |
Serialize(Object)
Serializes the value to json string.
Declaration
public string Serialize(object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | The value |
Returns
Type | Description |
---|---|
System.String | The serialized json |