aboutsummaryrefslogtreecommitdiffstats
path: root/TODO
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-05-07 18:16:05 +0200
committerJay Berkenbilt <ejb@ql.org>2022-05-08 19:45:20 +0200
commit8d348974aa38001c74458b6e0a1709f8fce06743 (patch)
tree5d74f3512c0a04b8196a16f190b2c039aa864fea /TODO
parent15272662f632c627c278721673df5f999df39bcd (diff)
downloadqpdf-8d348974aa38001c74458b6e0a1709f8fce06743.tar.zst
Prepare test suite for json v2
Diffstat (limited to 'TODO')
-rw-r--r--TODO27
1 files changed, 1 insertions, 26 deletions
diff --git a/TODO b/TODO
index b7c4e04b..35cfbd79 100644
--- a/TODO
+++ b/TODO
@@ -63,10 +63,6 @@ General things to remember:
* Test stream with invalid data
-* Consider using camelCase in multi-word key names to be consistent
- with job JSON and with how JSON is often represented in languages
- that use it more natively.
-
* When we get to full serialization, add json serialization
performance test.
@@ -76,31 +72,10 @@ General things to remember:
JSON representation of the object and could include indirect
references, etc. We could also add --delete object.
-Object Representation:
-
-* Arrays, dictionaries, booleans, nulls, integers, and real numbers
- are represented as their native JSON type. Real numbers that are out
- of range will just be dealt with by however whatever JSON parser is
- in use deals with it. Numbers like that shouldn't appear in PDF and,
- if they do, they won't work right for anything. QPDF's JSON
- representation allows for arbitrary precision.
-* Names: "/Name" -- internal/canonical representation (e.g.
- "/Text/Plain", not #xx quoted)
-* Indirect objects: "n n R"
-* Strings: one of
- "u:json utf-8-encoded string"
- "b:hex-encoded bytes"
- Test cases: these are the same:
+* Object representation tests
* "b:cf80", "b:CF80", "u:π", "u:\u03c0"
* "b:d83edd54", "u:🥔", "u:\ud83e\udd54"
-When creating output from a string:
-* If the string is explicitly unicode (UTF-8 or UTF-16), encode as
- "u:" without the leading U+FEFF
-* Else if the string can be bidirectionally mapped between pdf-doc and
- unicode, transcode to unicode and encode as "u:"
-* Else encode as "b:"
-
When reading a JSON string, any string that doesn't follow the above rules
is an error. Just use newUnicodeString on "u:" strings. For "b:"
strings, decode the bytes with hex_decode and use newString.