diff options
author | Florian Frank <flori@ping.de> | 2010-08-06 02:53:05 +0200 |
---|---|---|
committer | Florian Frank <flori@ping.de> | 2010-08-06 02:53:05 +0200 |
commit | 7bcff4cc5de6b484393de8adb4f4d4488df669e6 (patch) | |
tree | ec9b3f3afc41854315d111c0d6d83d92f16ad038 | |
parent | 37d70383addefb18944740c7c6b88bb210d54485 (diff) | |
download | json-7bcff4cc5de6b484393de8adb4f4d4488df669e6.tar.gz |
changed documentation
-rw-r--r-- | README | 12 |
1 files changed, 5 insertions, 7 deletions
@@ -11,13 +11,11 @@ will be two variants available: generated by the ragel state machine compiler http://www.cs.queensu.ca/~thurston/ragel . -Both variants of the JSON generator escape all non-ASCII and control characters -with \uXXXX escape sequences, and support UTF-16 surrogate pairs in order to be -able to generate the whole range of unicode code points. This means that -generated JSON document is encoded as UTF-8 (because ASCII is a subset of -UTF-8) and at the same time avoids decoding problems for receiving endpoints, -that don't expect UTF-8 encoded texts. On the negative side this may lead to a -bit longer strings than necessarry. +Both variants of the JSON generator generate UTF-8 character sequences by +default. If an :ascii_only option with a true value is given, they escape all +non-ASCII and control characters with \uXXXX escape sequences, and support +UTF-16 surrogate pairs in order to be able to generate the whole range of +unicode code points. All strings, that are to be encoded as JSON strings, should be UTF-8 byte sequences on the Ruby side. To encode raw binary strings, that aren't UTF-8 |