[]
        
(Showing Draft Content)

C1.JsonNet.JsonHelper.SerializeObject

SerializeObject Method

SerializeObject(object, JsonSetting)

Serializes the specified object to a JSON string using JsonSetting.

Declaration
public static string SerializeObject(object obj, JsonSetting js = null)
Parameters
Type Name Description
object obj

The object to serialize.

JsonSetting js

The JsonSetting used to serialize the object. If this is null, default serialization settings will be used.

Returns
Type Description
string

A JSON string representation of the object.

SerializeObject(object, IList<JsonConverter>)

Serializes the specified object to a JSON string using a collection of JsonConverter.

Declaration
public static string SerializeObject(object obj, IList<JsonConverter> jsCters)
Parameters
Type Name Description
object obj

The object to serialize.

IList<JsonConverter> jsCters

A collection of JsonConverter

Returns
Type Description
string

A JSON string representation of the object.

SerializeObject(object, JsonResolver)

Serializes the specified object to a JSON string using JsonResolver.

Declaration
public static string SerializeObject(object obj, JsonResolver resolver)
Parameters
Type Name Description
object obj

The object to serialize.

JsonResolver resolver

The object of JsonResolver

Returns
Type Description
string

A JSON string representation of the object.