Return type:
WRITE-JSON ( target-type , file stream stream-handle memptr longchar, formatted , encoding , omit-initial-values, omit-outer-object )A CHARACTER expression that specifies the target for the JSON string. Valid values are "FILE", "STREAM", "STREAM-HANDLE", "MEMPTR", and "LONGCHAR".A CHARACTER expression that specifies the name of a stream. If you specify the empty string (""), the AVM writes the JSON string to the default unnamed output stream. For WebSpeed, write the JSON string to the WebSpeed-defined output stream (WEBSTREAM).For more information about using ABL unnamed output streams, see the DEFINE STREAM statement reference entry and the chapter on alternate I/O sources in OpenEdge Development: Programming Interfaces. For more information about using WebSpeed-defined output streams, see OpenEdge Application Server: Developing WebSpeed Applications.The AVM saves the JSON string to the LONGCHAR variable in the code page that corresponds to the character encoding you specify in the encoding option. If you do not specify a character encoding for the JSON string, the AVM saves the LONGCHAR variable in UTF-8.If the LONGCHAR variable's code page is fixed (that is, set using the FIX-CODEPAGE statement) and the fixed code page is not equivalent to the character encoding you specify in the encoding option, the WRITE-JSON( ) method generates an error and returns FALSE. The JSON string is not saved to the LONGCHAR.If you specify the Unknown value (?), the method uses the default value of FALSE.The encoding name must specify a Unicode transformation format. Valid values are "UTF-8", "UTF-16", "UTF-16BE", "UTF-16LE", "UTF-32", "UTF-32BE", and "UTF-32LE".
Note: If you specify the empty string ("") or the Unknown value (?), the AVM uses the default encoding of UTF-8.An optional LOGICAL expression where TRUE directs the AVM to exclude temp-table fields containing their initial values from the JSON string, and FALSE directs the AVM to include all temp-table field data in the JSON. The default value is FALSE. If you specify the Unknown value (?), the method uses the default value of FALSE.If you specify the the Unknown value (?), the method uses the default value of FALSE.
Using the ADD-PARENT-ID-RELATION( ) method on a dynamic ProDataSet object
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates. |