toJson

Converts a .NET object to a JSON string. Uses the Newtonsoft Json.NET serializer, which, unlike JSON.stringify, can serialize self-references.

Syntax

function toJson(object: any): string
 
Parameter Description
object .NET object you wish to serialize in JSON format.

Return Value

Returns a JSON string describing the object.

Examples