diff options
author | Mark Pulford <mark@kyne.com.au> | 2011-05-03 00:58:57 +0930 |
---|---|---|
committer | Mark Pulford <mark@kyne.com.au> | 2011-05-03 00:58:57 +0930 |
commit | ec18dfc358cc4391eec3a37bdb81fe8d5a8b3d69 (patch) | |
tree | 455261ec3b9bbebab54d2c6a27b40ea544c92389 /strbuf.h | |
parent | a9bb5006d228539a1ec5028df7f660f862b0f2cc (diff) | |
download | lua-cjson-ec18dfc358cc4391eec3a37bdb81fe8d5a8b3d69.tar.gz lua-cjson-ec18dfc358cc4391eec3a37bdb81fe8d5a8b3d69.tar.bz2 lua-cjson-ec18dfc358cc4391eec3a37bdb81fe8d5a8b3d69.zip |
Escape all unprintable ASCII when encoding
Replace json_escape_char() with a static char2escape[] lookup table.
Escape all unprintable ASCII (0-31, 127) and JSON special characters
(double quote, backslash).
Dynamic creation of the char2escape table has been left commented out
due to an apparent performance hit. The performance loss may be due to
memory/page alignment (unknown).
Rename parsing lookup table from ch2escape to escape2char for consistency.
Diffstat (limited to 'strbuf.h')
0 files changed, 0 insertions, 0 deletions