Return type:
Applies to:
SERIALIZE-ROW ( target-format , 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 output. 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 buffer’s current row to the default unnamed output stream. For WebSpeed, write the buffer’s current row 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 buffer’s current row 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 LONGCHAR, 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 SERIALIZE-ROW( ) method generates an error and returns FALSE. The buffer’s current row is not saved to the LONGCHAR.If you specify the Unknown value (?), the method uses the default value of FALSE.When target-format is "JSON", 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".When target-format is "XML", the encoding name must be an Internet Assigned Numbers Authority (IANA) name supported by the ABL XML Parser. For a list of supported IANA encodings and their corresponding ABL code pages, see Table 77 in the ENCODING attribute reference entry.
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 output, and FALSE directs the AVM to include all temp-table field data in the output. The default value is FALSE. If you specify the Unknown value (?), the method uses the default value of FALSE.If you specify the Unknown value (?), the method uses the default value of FALSE.omit-outer-object is only valid when target-format is "JSON". If omit-outer-object is TRUE when target-type is "XML", the AVM generates an error and returns FALSE.
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates. |