JSON functions #5900
beikov
started this conversation in
Design Proposals
JSON functions
#5900
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The idea is to add some functions to query and manipulate JSON.
Also see https://modern-sql.com/blog/2017-06/whats-new-in-sql-2016
Construction
json_object(k1,v1[,kn,vn]*)
- constructor function that creates a json objectjson_array(v1[,vn]*)
- constructor function that creates a json arrayjson_parse(payload)
- parses a json objectQuery
json_arrayagg(any) within group (...)
- aggregates json objects into a json arrayjson_objectagg(key, value)
- aggregates key-values into a single json objectjson_value(json, jsonpath [returning <type>] )
- returns a scalar value for the path where can be number, boolean or string (default)json_exists(json, jsonpath)
true if the JSON document contains a value for the path expression, and false otherwisejson_query(json, jsonpath)
returns a json documentManipulation
json_concat(json, json)
json_set(json, jsonpath, element)
- returns a JSON having the given path set with the given elementTrack HHH-18496 for progress.
Beta Was this translation helpful? Give feedback.
All reactions