diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 13 |
1 files changed, 1 insertions, 12 deletions
@@ -26,13 +26,6 @@ encoded, please use the to\_json\_raw\_object method of String (which produces an object, that contains a byte array) and decode the result on the receiving endpoint. -The JSON parsers can parse UTF-8, UTF-16BE, UTF-16LE, UTF-32BE, and UTF-32LE -JSON documents under Ruby 1.8. Under Ruby 1.9 they take advantage of Ruby's -M17n features and can parse all documents which have the correct -String#encoding set. If a document string has ASCII-8BIT as an encoding the -parser attempts to figure out which of the UTF encodings from above it is and -trys to parse it. - ## Installation It's recommended to use the extension variant of JSON, because it's faster than @@ -117,11 +110,7 @@ You can also use the `pretty_generate` method (which formats the output more verbosely and nicely) or `fast_generate` (which doesn't do any of the security checks generate performs, e. g. nesting deepness checks). -To create a valid JSON document you have to make sure, that the output is -embedded in either a JSON array `[]` or a JSON object `{}`. The easiest way to do -this, is by putting your values in a Ruby Array or Hash instance. - -There are also the `JSON` and `JSON[]` methods which use parse on a String or +There are also the JSON and JSON[] methods which use parse on a String or generate a JSON document from an array or hash: ```ruby |