[
https://issues.jboss.org/browse/TEIID-2159?page=com.atlassian.jira.plugin...
]
Steven Hawkins commented on TEIID-2159:
---------------------------------------
After starting the implementation I'm leaning toward just using a subtype of Clob
(similar to the XMLType.Type subtypes) to represent JSON rather than introducing a full
new type. This allows us to sidestep whether json needs to be a keyword and a host of
logic that needs added related to types.
An example usage:
{code}select jsonArray(1, null, true, {d '2007-01-01'},
jsonParse('{"name":123}', true), unescape('\t\n?')){code}
returns
{code}[1,null,true,"2007-01-01",{"name":123},"\t\n?"]{code}
note the conversion of date to string
JsonParse/JsonArray will be added as normal functions. While JsonObject and JsonArrayAgg
(which can be deprecated when we generally allow array type usage) will need
parsing/language object support.
The initial work should be in for beta2.
Provide language objects to produce a JSON document
---------------------------------------------------
Key: TEIID-2159
URL:
https://issues.jboss.org/browse/TEIID-2159
Project: Teiid
Issue Type: Feature Request
Components: Query Engine
Reporter: Ramesh Reddy
Assignee: Steven Hawkins
Fix For: 8.3
SQLXML is standard that lets users define XML constructs to define a XML documents using
SQL. However there is such standard exists for producing the JSON based documents.
It would be nice if Teiid provides such SQL language extensions produce and deal with
JSON documents. The constructs equivalent from SQLXML are
JsonParse
JsonObject
JsonArray
JsonForrest
JsonAgg
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira