partiql-lang-kotlin icon indicating copy to clipboard operation
partiql-lang-kotlin copied to clipboard

Add functions to convert between Ion/JSON and strings

Open dlurton opened this issue 4 years ago • 0 comments

While chatting with a customer about this I realized that these are going to be frequent requirements of customers. We should support them by default.

For example:

-- parses Ion (and by extension JSON too). 
parse_ion('{ "id": "1" }')

-- the same function can be used to parse a BLOB of ion binary:
parse_ion(someBlob)

-- return a string of Ion text
to_ion_text(someValue)

-- return a BLOB
to_ion_binary(someValue)

-- return a string of JSON
to_json(someValue)

dlurton avatar Sep 16 '20 17:09 dlurton