commit | 3c0eac3cba8bde03040dab6f6b0022020cec4192 | [log] [tgz] |
---|---|---|
author | Marti Bolivar <marti.bolivar@linaro.org> | Wed May 03 15:57:18 2017 -0400 |
committer | Anas Nashif <nashif@linux.intel.com> | Mon May 08 08:52:52 2017 -0400 |
tree | 0da72fd34c8d78bbb343f93010471a497635f6c4 | |
parent | b192ea2bd4c3e658252cbb279c455f5489dcfc3f [diff] |
lib: json: escape strings in-place Currently, json_escape() allocates a temporary buffer on the stack that's the size of the string being escaped. Stack space is precious and longer JSON strings can run into the hundreds of bytes, so re-implement this routine to escape in place. Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>