json_fast
json_fast copied to clipboard
to-json/pretty: "\uD83C\uDDE9\uD83C\uDDEA" is not pretty
Pretty output is for humans. "\uD83C\uDDE9\uD83C\uDDEA" is not pretty.
What happens:
$ perl6 -MJSON::Fast -e 'say to-json "🇩🇪", :pretty'
"\uD83C\uDDE9\uD83C\uDDEA"
Expected output:
"🇩🇪"
i disagree. :pretty json output should still be valid json, as terrible as that is.
welp, re-reading the multitude of json rfcs i don't understand where i got the impression that anything outside of the basic multilingual plane has to be turned into utf16 surrogate pairs that are then escaped.