skip to main content
Connection property descriptions : JsonFormat
  

Try DataDirect Drivers Now

JsonFormat

Purpose

Determines the JSON string format in which the driver returns values for complex data types, such as Array and Struct.

Valid Values

raw | keyvalue | pretty | unsafe

Behavior

If set to raw, the values are returned in their native Google BigQuery format.
If set to keyvalue, the values are returned in key value pairs. Also, if there is a closing curly bracket (}) or a back slash (\) in a value, the driver escapes it by adding a back slash (\) in front of it. For example, if the value is "8}", the driver returns it as "8\}".
If set to pretty, only the values are returned (unaccompanied by keys).
If set to unsafe, the values are returned in key value pairs. However, if there are any special characters in them, they are not escaped.

Examples

If the data type is Simple Array and values are [121,122,123], the driver returns the values in one of the following formats based on the valid value you set for the JsonFormat property:
Valid Value
Data Format
keyvalue
[{v=121},{v=122},{v=123}]
pretty
[121, 122, 123]
raw
[{"v":"121"},{"v":"122"},{"v":"123"}]
unsafe
[{v=121},{v=122},{v=123}]

Data Source Method

setJsonFormat

Default

raw

Data Type

String

See also

Additional properties