Open loguntsov opened 6 years ago
you can use raw
like: jsx:encode([{<<"key">>, {raw, "{\"a\":1}"}])
but it's not particularly efficient. it's equivalent to jsx:encode([{<<"key">>, jsx:decode("{\"a\":1}")])
more or less
i don't like it
Can i develop this logic jsx:encode([{raw, key, <<"{'a':1}">>}]) to make best way for my purpose ? Will this pull request be merged with upstream ?
Is this still a valid concern? I seem to want something similar, but this issue went nowhere.
Hello.
This is not issue but just question. Is there way to insert RAW data into encoded json ? As example: I have valid JSON-string: "{'a':1}" (it can be big string) i would want insert this string as JSON: {'key':{'a':1}}. I don't want decode/encode string twice, i just want insert this string to get resulted JSON as above. Is there way for this ?
I imagine this way like this:
jsx:encode([{raw, key, "{'a':1}"}])
Thank you.