Commit 3c4d2bfb2104df2b27f4f0f962cd0c15fccf2930
1 parent
8d2a0eda
TODO: JSON notes
Showing
1 changed file
with
20 additions
and
0 deletions
TODO
| ... | ... | @@ -41,6 +41,26 @@ Output JSON v2 |
| 41 | 41 | |
| 42 | 42 | Remember typo: search for "Typo" In QPDFJob::doJSONEncrypt. |
| 43 | 43 | |
| 44 | +Remember to test interaction between generators and schemas. | |
| 45 | + | |
| 46 | +Should I have allowed array and object generators? Or maybe just | |
| 47 | +string generators for stream data? | |
| 48 | + | |
| 49 | +When switching to generators for output, it's going to be very | |
| 50 | +important not to break the logic around having things that look at all | |
| 51 | +objects going first. Right now, there are good tests for it -- if you | |
| 52 | +either comment out pushInheritedAttributesToPage or do something that | |
| 53 | +postpones serializing the objects from allObjects (or even getting | |
| 54 | +them), you get test failures either way. However, if we were to | |
| 55 | +blindly overwrite test files, we might accidentally lose this. We will | |
| 56 | +have to try to get most of the logic working before trying to use | |
| 57 | +generators. Or maybe we shouldn't use generators at all for the | |
| 58 | +objects and only use it for the stream data. Or maybe we can use | |
| 59 | +generators but write it out early by exposing the depth() parameter. | |
| 60 | +That might actually the safest way to do it. But that will be hard | |
| 61 | +with schemas. Another thing might be to not combine serializing with | |
| 62 | +other kinds of metadata. | |
| 63 | + | |
| 44 | 64 | Output JSON v2 will contain enough information to completely recreate |
| 45 | 65 | a PDF file. In other words, qpdf will have full, bidirectional, |
| 46 | 66 | lossless json serialization/deserialization of PDF. | ... | ... |