Class JsonService
Default implementation for IJsonService, it uses Newtonsoft Json
Inheritance
System.Object
JsonService
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Onbox.Core.V8.Json
Assembly: Onbox.Core.dll
Syntax
public class JsonService : IJsonService
Constructors
| Improve this Doc View SourceJsonService(JsonSerializerSettings)
Constructor
Declaration
public JsonService(JsonSerializerSettings settings)
Parameters
Type | Name | Description |
---|---|---|
Newtonsoft.Json.JsonSerializerSettings | settings |
Methods
| Improve this Doc View SourceDeserialize<T>(String)
Deserializes an object
Declaration
public T Deserialize<T>(string json)
Parameters
Type | Name | Description |
---|---|---|
System.String | json |
Returns
Type | Description |
---|---|
T |
Type Parameters
Name | Description |
---|---|
T |
Serialize(Object)
Serializes an object
Declaration
public string Serialize(object instance)
Parameters
Type | Name | Description |
---|---|---|
System.Object | instance |
Returns
Type | Description |
---|---|
System.String |