Parameters
- value
- Array entry value or object property value.
- asIs
- If true, the value will be written as is.
If asIs parameter is true, the value of object is converted to string using the invariant culture format provider and then it is written to the internal string builder as is.
If asIs parameter is false, the type of value is recognized and this value is properly converted to JSON. If the value type implements the IJsonObject interface, its WriteTo method is invoked. Otherwise, the following types are recognized and especially converted: unknown type (null reference), Boolean, DateType, and a numeric type. Values of two complex types are especially recognized—IDictionary<string,object>
and IList<object>
. The first one is converted to a JSON object containing properties specified in the dictionary and the last one is converted to a JSON array. A value of another type is converted to string and then it is written as quoted string value with special characters encoded.
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family