1OK: json_object_from_fd(valid.json)={ "foo": 123 }
2OK: json_object_from_fd_ex(valid_nested.json, 20)={ "foo": 123, "obj2": { "obj3": { "obj4": { "foo": 999 } } } }
3OK: correctly unable to parse contents of valid_nested.json with low max depth: json_tokener_parse_ex failed: nesting too deep
4
5OK: json_object_from_file(./not_present.json) correctly returned NULL: json_object_from_file: error opening file ./not_present.json: ERRNO=ENOENT
6
7OK: json_object_from_fd(closed_fd), expecting NULL, EBADF, got:NULL, json_object_from_fd: error reading fd 10: ERRNO=EBADF
8
9OK: json_object_to_file(json.out, jso)=0
10file[json.out], size=336, contents={"foo":1234,"foo1":"abcdefghijklmnopqrstuvwxyz","foo2":"abcdefghijklmnopqrstuvwxyz","foo3":"abcdefghijklmnopqrstuvwxyz","foo4":"abcdefghijklmnopqrstuvwxyz","foo5":"abcdefghijklmnopqrstuvwxyz","foo6":"abcdefghijklmnopqrstuvwxyz","foo7":"abcdefghijklmnopqrstuvwxyz","foo8":"abcdefghijklmnopqrstuvwxyz","foo9":"abcdefghijklmnopqrstuvwxyz"}
11
12OK: json_object_to_file_ext(json2.out, jso, JSON_C_TO_STRING_PRETTY)=0
13file[json2.out], size=367, contents={
14  "foo":1234,
15  "foo1":"abcdefghijklmnopqrstuvwxyz",
16  "foo2":"abcdefghijklmnopqrstuvwxyz",
17  "foo3":"abcdefghijklmnopqrstuvwxyz",
18  "foo4":"abcdefghijklmnopqrstuvwxyz",
19  "foo5":"abcdefghijklmnopqrstuvwxyz",
20  "foo6":"abcdefghijklmnopqrstuvwxyz",
21  "foo7":"abcdefghijklmnopqrstuvwxyz",
22  "foo8":"abcdefghijklmnopqrstuvwxyz",
23  "foo9":"abcdefghijklmnopqrstuvwxyz"
24}
25OK: json_object_to_fd(json3.out, jso, JSON_C_TO_STRING_PRETTY)=0
26OK: json_object_to_fd(json3.out, jso, JSON_C_TO_STRING_PLAIN)=0
27file[json3.out], size=703, contents={
28  "foo":1234,
29  "foo1":"abcdefghijklmnopqrstuvwxyz",
30  "foo2":"abcdefghijklmnopqrstuvwxyz",
31  "foo3":"abcdefghijklmnopqrstuvwxyz",
32  "foo4":"abcdefghijklmnopqrstuvwxyz",
33  "foo5":"abcdefghijklmnopqrstuvwxyz",
34  "foo6":"abcdefghijklmnopqrstuvwxyz",
35  "foo7":"abcdefghijklmnopqrstuvwxyz",
36  "foo8":"abcdefghijklmnopqrstuvwxyz",
37  "foo9":"abcdefghijklmnopqrstuvwxyz"
38}{"foo":1234,"foo1":"abcdefghijklmnopqrstuvwxyz","foo2":"abcdefghijklmnopqrstuvwxyz","foo3":"abcdefghijklmnopqrstuvwxyz","foo4":"abcdefghijklmnopqrstuvwxyz","foo5":"abcdefghijklmnopqrstuvwxyz","foo6":"abcdefghijklmnopqrstuvwxyz","foo7":"abcdefghijklmnopqrstuvwxyz","foo8":"abcdefghijklmnopqrstuvwxyz","foo9":"abcdefghijklmnopqrstuvwxyz"}
39OK: json_object_from_file(valid.json)={ "foo": 123, "obj2": { "obj3": { "obj4": { "foo": 999 } } } }
40OK: json_object_from_fd(valid.json)={ "foo": 123, "obj2": { "obj3": { "obj4": { "foo": 999 } } } }
41