Permalink
Browse files

Allow testing yajl_gen_escape_solidus

  • Loading branch information...
1 parent 0d480b2 commit f7e95b936f1d53b1f19a93d7cdca0821d7e09f93 @ConradIrwin ConradIrwin committed Jul 17, 2011
Showing with 4 additions and 0 deletions.
  1. +4 −0 reformatter/json_reformat.c
View
4 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]);

0 comments on commit f7e95b9

Please sign in to comment.