Unescapes JSON's escaped strings
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Makefile
README.md
example.c
unescape.c
unescape_test.c

README.md

unescape.c

Simple implementation which unescapes JSON's escaped UTF-8 encoded strings.

Example:

$ cat > example.c
#include <stdio.h>
const char *unescape(const char *, char *, size_t);
main()
{
    char buf[80];
    printf("%s\n",
        unescape("\\u3053\\u3093\\u306b\\u3061\\u306f\\u4e16\\u754c\\uff01",
        buf, sizeof(buf)));
}
^D
$
$ cc -o example example.c unescape.c
$
$ ./example
こんにちは世界!
$