Link Search Menu Expand Document

JSONDocument.Save Method

Explanation Output the Array object set to Value in the Writer object as JSON data.

If the Array object is not set in the Value value , "[]" is output.

Since CRS does not have a Boolean value internally, it will be true when saved and 1 or 0 when false .

If the internal character code is Unicode , the character code of the saved JSON file will be UTF-8 .
Call format jsondoc.Save( writer )
Return value None
Argument Object writer WriterObject to save to
Exception JSON-4 No valid Write object specified
JSON-5 Does not support the Write () method
Example of use
        var jsondoc = new JSONDocument;
        var res = session.Get("http://server/sample.json");
        jsondoc.Load(res);
        var fs = new FileSystem;
        var fp = fs.Open("sample.json", FileSystem.OPEN_WRITE);
        jsondoc.Save(fp);
        fp.Close();
    
Related item Load method