diff options
author | Dr. David Alan Gilbert <dave@treblig.org> | 2017-03-05 01:25:18 +0000 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2017-03-11 15:48:42 +0000 |
commit | 799e1651b463bf127e6a99573e20331f6d7399b3 (patch) | |
tree | 647420d1bd668a4bb6aa57061057911a3520b26d /json-glib/tests/invalid.c | |
parent | c7b7b18e39522d8718e1d5118fe34d9b1c9707a0 (diff) | |
download | json-glib-799e1651b463bf127e6a99573e20331f6d7399b3.tar.gz |
Allow empty string as object member name
Commit 028e540 disallowed empty member names in objects, however
they are unfortunately valid JSON. This patch reenables an empty
string as a member name.
Tests are updated to allow the empty string case, and to test
the use of an empty string in generation, iteration etc.
https://bugzilla.gnome.org/show_bug.cgi?id=747279
Diffstat (limited to 'json-glib/tests/invalid.c')
-rw-r--r-- | json-glib/tests/invalid.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/json-glib/tests/invalid.c b/json-glib/tests/invalid.c index c5fad16..b782566 100644 --- a/json-glib/tests/invalid.c +++ b/json-glib/tests/invalid.c @@ -231,7 +231,7 @@ static const struct { "object-4", "{ \"foo\" : 42 ]", test_invalid_object }, { "object-5", "{ \"blah\" }", test_invalid_object }, { "object-6", "{ \"a\" : 0 \"b\" : 1 }", test_invalid_object }, - { "object-7", "{ \"\" : false }", test_invalid_object }, + { "object-7", "{ null: false }", test_invalid_object }, /* missing commas */ { "missing-comma-1", "[ true false ]", test_missing_comma }, |