diff options
author | Conrad Irwin <conrad.irwin@gmail.com> | 2011-07-17 14:47:37 -0700 |
---|---|---|
committer | Conrad Irwin <conrad.irwin@gmail.com> | 2011-07-17 14:47:37 -0700 |
commit | f7e95b936f1d53b1f19a93d7cdca0821d7e09f93 (patch) | |
tree | 42e4ac4b90b16d5161d5e1b8cc280831fcebba92 | |
parent | 0d480b254d66925d591c6dc0193cd2731541e30a (diff) | |
download | yajl-f7e95b936f1d53b1f19a93d7cdca0821d7e09f93.tar.gz |
Allow testing yajl_gen_escape_solidus
-rw-r--r-- | reformatter/json_reformat.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/reformatter/json_reformat.c b/reformatter/json_reformat.c index c5b88f0..ce77c11 100644 --- a/reformatter/json_reformat.c +++ b/reformatter/json_reformat.c @@ -99,6 +99,7 @@ usage(const char * progname) "usage: json_reformat [options]\n" " -m minimize json rather than beautify (default)\n" " -u allow invalid UTF8 inside strings during parsing\n", + " -e escape any forward slashes (for embedding in HTML)\n", progname); exit(1); @@ -136,6 +137,9 @@ main(int argc, char ** argv) case 'u': yajl_config(hand, yajl_dont_validate_strings, 1); break; + case 'e': + yajl_gen_config(g, yajl_gen_escape_solidus, 1); + break; default: fprintf(stderr, "unrecognized option: '%c'\n\n", argv[a][i]); |