[
https://issues.apache.org/jira/browse/CALCITE-2872?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Hongze Zhang updated CALCITE-2872:
----------------------------------
Description:
Syntax of {{JSON representation}} clause:
{code:java}
<JSON representation> ::= JSON [ ENCODING { UTF8 | UTF16 | UTF32 } ] |
<implementation-defined JSON representation option>
{code}
>From ISO/IEC 9075-6[1]:
{quote}
A <JSON value expression> may have an optional <JSON input clause>. This
indicates that the values expression should be parsed as JSON. The standardized
option is FORMAT JSON; implementations may also support syntax such as FORMAT
AVRO or FORMAT BSON. When using the <JSON input clause>, the <value expression>
may be either a character string or a binary string.
{quote}
Currently we have already added base syntax support of UTF8/UTF16/UTF32 encoded
JSON to parser[2]. However the flags won't appear in parse tree for now.
[1]
http://standards.iso.org/ittf/PubliclyAvailableStandards/c065143_ISO_IEC_TR_19075-5_2016.zip
[2]
https://github.com/apache/calcite/blob/master/core/src/main/codegen/templates/Parser.jj#L4875
> Support for specifying encoding in JSON representation clause
> -------------------------------------------------------------
>
> Key: CALCITE-2872
> URL: https://issues.apache.org/jira/browse/CALCITE-2872
> Project: Calcite
> Issue Type: Sub-task
> Reporter: Hongze Zhang
> Priority: Major
>
> Syntax of {{JSON representation}} clause:
> {code:java}
> <JSON representation> ::= JSON [ ENCODING { UTF8 | UTF16 | UTF32 } ] |
> <implementation-defined JSON representation option>
> {code}
> From ISO/IEC 9075-6[1]:
> {quote}
> A <JSON value expression> may have an optional <JSON input clause>. This
> indicates that the values expression should be parsed as JSON. The
> standardized option is FORMAT JSON; implementations may also support syntax
> such as FORMAT AVRO or FORMAT BSON. When using the <JSON input clause>, the
> <value expression> may be either a character string or a binary string.
> {quote}
> Currently we have already added base syntax support of UTF8/UTF16/UTF32
> encoded JSON to parser[2]. However the flags won't appear in parse tree for
> now.
> [1]
> http://standards.iso.org/ittf/PubliclyAvailableStandards/c065143_ISO_IEC_TR_19075-5_2016.zip
> [2]
> https://github.com/apache/calcite/blob/master/core/src/main/codegen/templates/Parser.jj#L4875
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)