JsonFormat
- Last Updated: August 21, 2019
- 1 minute read
- DataDirect Connectors
- JDBC
- Google BigQuery 6.0
- Documentation
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
| 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