aboutsummaryrefslogtreecommitdiffstats
path: root/include/qpdf/JSON.hh
AgeCommit message (Collapse)Author
2022-09-23Comment about qpdf/PointerHolder.hh in public headersJay Berkenbilt
2022-07-31Fix/clarify meaning of depth parameter to json write methodsJay Berkenbilt
2022-07-31Spell checkJay Berkenbilt
2022-07-24JSON schema: support multi-element array validationJay Berkenbilt
2022-07-24JSON schema -- accept single item in place of arrayJay Berkenbilt
When the schema wants a variable-length array, allow a single item as well as allowing an array.
2022-06-09Fix minor doc typos in JSON.hhm-holger
2022-05-21JSON: Fix large file supportJay Berkenbilt
2022-05-20JSON: detect duplicate dictionary keys while parsingJay Berkenbilt
2022-05-14JSON reactor: improve handling of nested containersJay Berkenbilt
Call the parent container's item method before calling the child item's start method so we can easily know the current nesting level when nested items are added.
2022-05-07Prepare code for JSON v2Jay Berkenbilt
Update getJSON() methods and calls to them
2022-05-07Objects json: write incrementally and in numeric orderJay Berkenbilt
The following script was used to adjust test data: ---------- #!/usr/bin/env python3 import json import sys import re def json_dumps(data): return json.dumps(data, ensure_ascii=False, indent=2, separators=(',', ': ')) for filename in sys.argv[1:]: with open(filename, 'r') as f: data = json.loads(f.read()) if 'objects' not in data: continue trailer = None to_sort = [] for k, v in data['objects'].items(): if k == 'trailer': trailer = v else: m = re.match(r'^(\d+) \d+ R', k) if m: to_sort.append([int(m.group(1)), k, v]) newobjects = {x[1]: x[2] for x in sorted(to_sort)} if trailer is not None: newobjects['trailer'] = trailer data['objects'] = newobjects print(json_dumps(data)) ----------
2022-05-07Make JSON::writeNext publicJay Berkenbilt
2022-05-07JSON: add blob type that generates base64-encoded binary dataJay Berkenbilt
2022-05-04Change JSON parser to parse from an InputSourceJay Berkenbilt
2022-05-04JSON: add write methods and implement unparse() in terms of thoseJay Berkenbilt
2022-05-02Add reactors to the JSON parserJay Berkenbilt
2022-04-16Use = default and = delete where possible in classesJay Berkenbilt
2022-04-09Replace PointerHolder with std::shared_ptr in library sources onlyJay Berkenbilt
(patrepl and cleanpatch are my own utilities) patrepl s/PointerHolder/std::shared_ptr/g {include,libqpdf}/qpdf/*.hh patrepl s/PointerHolder/std::shared_ptr/g libqpdf/*.cc patrepl s/make_pointer_holder/std::make_shared/g libqpdf/*.cc patrepl s/make_array_pointer_holder/QUtil::make_shared_array/g libqpdf/*.cc patrepl s,qpdf/std::shared_ptr,qpdf/PointerHolder, **/*.cc **/*.hh git restore include/qpdf/PointerHolder.hh cleanpatch ./format-code
2022-04-04Programmatically apply new formatting to codeJay Berkenbilt
Run this: for i in **/*.cc **/*.c **/*.h **/*.hh; do clang-format < $i >| $i.new && mv $i.new $i done
2022-02-07Update for clean compile with POINTERHOLDER_TRANSITION=2Jay Berkenbilt
2022-02-04Update copyright for 2022Jay Berkenbilt
2022-02-04JSON: use std::shared_ptr internallyJay Berkenbilt
2022-02-02Fix some doc typosm-holger
2022-01-30Allow optional fields in json "schema" checksJay Berkenbilt
2022-01-30Implement JSONHandler for recursively processing JSONJay Berkenbilt
2022-01-30Add JSON::parseJay Berkenbilt
2022-01-30Add JSON::isDictionary and JSON::isArrayJay Berkenbilt
2021-01-04Update copyright to 2021Jay Berkenbilt
2020-01-26Update copyright to 2020Jay Berkenbilt
2019-01-07Update copyrights for 2019Jay Berkenbilt
2019-01-05Spell checkJay Berkenbilt
2018-12-25JSON::serialize -> unparseJay Berkenbilt
Unparse is admittedly strange, but I'd rather be strange and consistent, and everything else in the qpdf library uses unparse to serialize. (If you're reading this, the convention of using "unparse" comes from the "clu" programming language.)
2018-12-22Add simple JSON serializerJay Berkenbilt