Class MicroJsonSerializer
An implementation of IJsonSerializer that uses MicroJson
Assembly: Meadow.dll
View Source
Declaration
public class MicroJsonSerializer : IJsonSerializer
Implements:
Meadow.IJsonSerializer
Methods
Deserialize<T>(string)
Deserializes a provided string into a typed object
View Source
Declaration
public T Deserialize<T>(string json)
Returns
<T>
: An instance of T
Parameters
Type | Name | Description |
---|---|---|
System.String | json | The source JSON |
Type Parameters
Name | Description |
---|---|
T | The type to deserialize to |
Deserialize(string, Type)
Deserializes a provided string into a typed object
View Source
Declaration
public object Deserialize(string json, Type type)
Returns
System.Object
: An instance of 'type'
Parameters
Type | Name | Description |
---|---|---|
System.String | json | The source JSON |
System.Type | type | The type to deserialize to |
Serialize(object)
Serializes an object to a JSON representation
View Source
Declaration
public string? Serialize(object source)
Returns
System.String
: A JSON representationof the source object
Parameters
Type | Name | Description |
---|---|---|
System.Object | source | An object to serialize |