in reply to Re^3: JSON and utf8 flag
in thread JSON and utf8 flag

> I put data without UTF8 flag to JSON

RFC7159:

JSON text SHALL be encoded in UTF-8, UTF-16, or UTF-32.

($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

Replies are listed 'Best First'.
Re^5: JSON and utf8 flag
by Nick Kostirya (Sexton) on Sep 06, 2017 at 13:08 UTC

    I know, but... Quote from JSON-XS documentation:

    ENCODING/CODESET_FLAG_NOTES
    The main use for latin1 is to relatively efficiently store binary data as JSON, at the expense of breaking compatibility with most JSON decoders.

    I need to store data as text. I do not want to use Storable, MessagePack or Sereal.