Syntax 3
Description
Exports data from the specified buffer(s) and/or DataWindowChild
to a simple-format or standard-format JSON string.
Applies to
DataWindow type |
Method applies to |
---|---|
PowerBuilder |
DataWindow control, DataWindowChild object, and |
Syntax
PowerBuilder
1 |
string dwcontrol.ExportJson( boolean primarydata, boolean filterdata, boolean deletedata, boolean dwcdata {, boolean format} ) |
Argument |
Description |
---|---|
dwcontrol |
A reference to a DataWindow control, DataStore, or |
primarydata |
A boolean specifying whether to export the data
|
filterdata |
A boolean specifying whether to export the data
|
deletedata |
A boolean specifying whether to export the data
|
dwcdata |
A boolean specifying whether to export the
|
format (optional) |
A boolean specifying the JSON
See JSON formats for |
Return value
String. Returns the JSON string if it succeeds. Returns the empty
string (“”) if an error occurs.
The method returns null if any of the following:
-
any argument’s value is null
-
the DataWindow object (dataobject) is invalid
-
the DataWindow presentation style is unsupported, such as
Composite, Crosstab, OLE 2.0, or RichText
Examples
This example exports the data from the primary buffer and the
filter buffer of the DataWindow to a simple-format JSON string:
1 2 |
string ls_SimpleJson ls_SimpleJson = dw_1.ExportJson(true, true, false, false) |
This example exports the data from every buffer of the DataWindow
and the DataWindowChild to a standard-format JSON string:
1 2 |
string ls_StandardJson ls_StandardJson = dw_1.ExportJson(true, true, true, true, true) |
See also