Initializing help system before first use

jsonsave

jsonsave


Purpose
Save a JSON document.
Synopsis
procedure jsonsave(doc:xmldoc, fname:text)
Arguments
doc 
Document to save
fname 
Destination file name
Further information
1. This routine generates a JSON file from the provided xmldoc object. It is assumed that the document is built according to the JSON conventions (See Section JSON document as an XML tree). The result is undefined if the conventions are not respected.
2. This procedure does not require that the elements of the tree are typed using the "jst" attribute: the type is deduced from the value of the node when this attribute is missing. Moreover, both object member naming conventions can be used: when outputing an object, the member name can be taken either from the element name or from the attribute "name". If both are available, the attribute takes precedence.
Related topics
Module