summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2015-04-23 17:21:31 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2015-04-23 17:21:31 -0700
commit5ba9427f34800591cb45eb34403c71e2e65fd122 (patch)
tree55b986afecd77faa62e0a2bb57b90fb3fc88c6b7 /README.md
parenta1e388d59d98616d5d8ff79d7ae8a35030005ce8 (diff)
downloadffi-yajl-5ba9427f34800591cb45eb34403c71e2e65fd122.tar.gz
change :validate_utf8=false to still emit utf8lcg/utf8-string-replacement
validate_utf8=true raises on bad input validate_utf8=false now does not raise, but still produces valid UTF-8 clean JSON by replacing characters. the previous behavior of emitting bad JSON that was not UTF-8 clean when validate_utf8 was false is dropped (and this was behavior only of the C extension and not the ffi extension since the ffi layer must do some scrubbing of its own).
Diffstat (limited to 'README.md')
-rw-r--r--README.md8
1 files changed, 5 insertions, 3 deletions
diff --git a/README.md b/README.md
index c6459ed..a1b7ca2 100644
--- a/README.md
+++ b/README.md
@@ -71,7 +71,7 @@ hash = parser.parse( json )
* `:check_utf8`
* `:dont_validate_strings`
* `:symbolize_keys` (default = false):
-* `:symbolize_names` (default = false): alias for `:symbolize_keys`
+* `:symbolize_names` (default = false): Alias for `:symbolize_keys`.
* `:allow_trailing_garbage`
* `:allow_multiple_values`
* `:allow_partial_values`
@@ -79,8 +79,10 @@ hash = parser.parse( json )
## Encoder Options
-* `:pretty` (default = false):
-* `:validate_utf8`
+* `:pretty` (default = false): Produces more human readable 'pretty' output.
+* `:validate_utf8` (default = true): Will raise an exception when trying to
+ encode strings that are invalid UTF-8. When set to false this still will
+ procude valid UTF-8 JSON but will replace invalid characters.
## Forcing FFI or C Extension