Property | Description | |||
Method Name | ToJsonStream | |||
Return | The JSON data contained in the object | |||
Argument - bIncludeDocHeader | If this is true then header <?xml version="1.0" ?> is applied to the output (making it a proper JSON document as opposed to a snippet.) | |||
Argument - bFormatJSON | Indicates how the JSON should be formatted. true to turn on indenting, false for no formatting (single line output). |
|||
Argument - encoding | The type of encoding to use when formatting the JSON. UTF8, UTF16 & Unicode are options. UTF8 is default. | |||
Argument - eolType | Indicates the type of End of line token to use, LF or CRLF. Defaults to LF. | |||
Argument - context |
The CSerializationContext object controls the way in which JSON is serialized/de-serialized. Its main role is to control the way in which validation is performed and which namespaces are output. Note: If you are writing a multithreaded app it is highly recommended that you use a different instance of this class on each thread, as access to the static instance is not synchronized. Although read only operations to the static instance (CSerializationContext::Default) of the class are thread safe, if the global instance CSerializationContext::Default is modified, then this could potentially cause threading problems. |
|||
Argument - compressionType | Indicates the type of compression to apply to the output file, NONE, GZIP, or ZLIB. Defaults to NONE. | |||
Description | returns a CBinaryData object containing a stream of bytes representing the JSON in its given encoding. | |||
Remarks |
It will raise an exception if the JSON within the object is not valid, i.e. an invalid number of entries in a collection. See Multi-Language Support and Global Functions for more information. |