partiql-lang-kotlin
partiql-lang-kotlin copied to clipboard
Add functions to convert between Ion/JSON and strings
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)