summaryrefslogtreecommitdiffstats
path: root/test/json.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2018-05-17 15:51:47 +0200
committerwm4 <wm4@nowhere>2018-05-24 19:56:34 +0200
commit76bff1a0003cc1b416dd6b1cc0e423a3a1ed6c74 (patch)
tree98f76dfe47ad74983ab0f3768137fe994215b76c /test/json.c
parent711858377ce3b0c5507221f77f27d6ebbe296b71 (diff)
downloadmpv-76bff1a0003cc1b416dd6b1cc0e423a3a1ed6c74.tar.bz2
mpv-76bff1a0003cc1b416dd6b1cc0e423a3a1ed6c74.tar.xz
json: format slightly nicer escape sequences
Make use the escape sequences allowed by JSON. Also update the linked RFC to the newest one.
Diffstat (limited to 'test/json.c')
-rw-r--r--test/json.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/json.c b/test/json.c
index 74fd20d748..d624f61cca 100644
--- a/test/json.c
+++ b/test/json.c
@@ -40,7 +40,8 @@ static const struct entry entries[] = {
{ "abc", .expect_fail = true},
{ " 123 ", "123", NODE_INT64(123)},
{ "123.25", "123.250000", NODE_FLOAT(123.25)},
- { TEXT("a\n\\"), TEXT("a\u000a\u005c"), NODE_STR("a\n\\")},
+ { TEXT("a\n\\\/\\\""), TEXT("a\n\\/\\\""), NODE_STR("a\n\\/\\\"")},
+ { TEXT("a\u2c29"), TEXT("aⰩ"), NODE_STR("a\342\260\251")},
{ "[1,2,3]", "[1,2,3]",
NODE_ARRAY(NODE_INT64(1), NODE_INT64(2), NODE_INT64(3))},
{ "[ ]", "[]", NODE_ARRAY()},