JsonDataContractSerializer
Assembly: ServiceStack.Client.dll
View Source
Declaration
public class JsonDataContractSerializer : IStringSerializer
Properties
TextSerializer
View Source
Declaration
public IStringSerializer TextSerializer { get; set; }
UseBcl
View Source
Declaration
public bool UseBcl { get; set; }
Fields
Instance
View Source
Declaration
public static JsonDataContractSerializer Instance
Methods
UseSerializer(IStringSerializer)
View Source
Declaration
public static void UseSerializer(IStringSerializer textSerializer)
Parameters
Type | Name |
---|---|
ServiceStack.Text.IStringSerializer | textSerializer |
SerializeToString<T>(T)
View Source
Declaration
public string SerializeToString<T>(T obj)
Returns
System.String
Parameters
Type | Name |
---|---|
<T> | obj |
Type Parameters
T
BclSerializeToString<T>(T)
View Source
Declaration
public static string BclSerializeToString<T>(T obj)
Returns
System.String
Parameters
Type | Name |
---|---|
<T> | obj |
Type Parameters
T
SerializeToStream<T>(T, Stream)
View Source
Declaration
public void SerializeToStream<T>(T obj, Stream stream)
Parameters
Type | Name |
---|---|
<T> | obj |
System.IO.Stream | stream |
Type Parameters
T
BclSerializeToStream<T>(T, Stream)
View Source
Declaration
public static void BclSerializeToStream<T>(T obj, Stream stream)
Parameters
Type | Name |
---|---|
<T> | obj |
System.IO.Stream | stream |
Type Parameters
T
DeserializeFromString(String, Type)
View Source
Declaration
public object DeserializeFromString(string json, Type returnType)
Returns
System.Object
Parameters
Type | Name |
---|---|
System.String | json |
System.Type | returnType |
BclDeserializeFromString(String, Type)
View Source
Declaration
public static object BclDeserializeFromString(string json, Type returnType)
Returns
System.Object
Parameters
Type | Name |
---|---|
System.String | json |
System.Type | returnType |
DeserializeFromString<T>(String)
View Source
Declaration
public T DeserializeFromString<T>(string json)
Returns
<T>
Parameters
Type | Name |
---|---|
System.String | json |
Type Parameters
T
DeserializeFromStream<T>(Stream)
View Source
Declaration
public T DeserializeFromStream<T>(Stream stream)
Returns
<T>
Parameters
Type | Name |
---|---|
System.IO.Stream | stream |
Type Parameters
T
DeserializeFromStream(Type, Stream)
View Source
Declaration
public object DeserializeFromStream(Type type, Stream stream)
Returns
System.Object
Parameters
Type | Name |
---|---|
System.Type | type |
System.IO.Stream | stream |
BclDeserializeFromStream(Type, Stream)
View Source
Declaration
public static object BclDeserializeFromStream(Type type, Stream stream)
Returns
System.Object
Parameters
Type | Name |
---|---|
System.Type | type |
System.IO.Stream | stream |