generateJsonFile
generateJsonFile(source: Any; format: Integer; fileName: String; usePresentationClient: Boolean);
The generateJsonFile method of the JadeJson class generates JSON from a primitive type variable or an object and writes the output to a file.
The generateJsonFile method parameters are:
-
The source parameter specifies the primitive type variable or object to be generated as JSON text output.
-
The format parameter specifies the format type to generate (that is, Format_Json_Microsoft or Format_Json_Newton).
-
The fileName parameter specifies the name of the file to create.
-
The usePresentationClient parameter specifies where the file is to be created. It specifies true if the file is to be created on the presentation client and the JADE process is a thin client; otherwise the file is created on the same node on which the logic is executing (an application server, a server, or a client for a standard (fat) client process).
Calling this method generates the JSON text for the source type in Microsoft or NewtonSoft format. A file is created and the generated JSON text is written to the file, which is given the file name specified in the fileName parameter. It is written to the presentation client or onto the JADE logic execution node. The file name should be an absolute path.
The generateJsonFile method does not create any referenced directories.
For details about creating the JSON, see the generateJson method.
2016.0.01 and higher