mirror of
https://github.com/json-c/json-c.git
synced 2026-03-29 01:49:06 +08:00
Issue #15: add a way to set a JSON_TOKENER_STRICT flag to forbid commas at the end of arrays and objects.
This commit is contained in:
@@ -51,5 +51,7 @@ json_tokener_parse_ex(tok, "\t" , 4) ... OK: got object of type [string
|
||||
json_tokener_parse_ex(tok, [1,2,3] , 7) ... OK: got object of type [array]: [ 1, 2, 3 ]
|
||||
json_tokener_parse_ex(tok, [1,2,3,] , 8) ... OK: got object of type [array]: [ 1, 2, 3 ]
|
||||
json_tokener_parse_ex(tok, [1,2,,3,] , 9) ... OK: got correct error: unexpected character
|
||||
End Incremental Tests OK=27 ERROR=0
|
||||
json_tokener_parse_ex(tok, [1,2,3,] , 8) ... OK: got correct error: unexpected character
|
||||
json_tokener_parse_ex(tok, {"a":1,} , 8) ... OK: got correct error: unexpected character
|
||||
End Incremental Tests OK=29 ERROR=0
|
||||
==================================
|
||||
|
||||
Reference in New Issue
Block a user