Commit Graph

19 Commits

Author SHA1 Message Date
Evan Driscoll
edb6b25569 Fancy printer predicate now takes current JSON object
The API is ugly at the moment. Will fix with an ugly
implementation soon.
2018-06-04 21:59:21 -05:00
Evan Driscoll
c7a64b8846 Example of more powerful matcher being useful 2018-06-03 22:41:42 -05:00
Evan Driscoll
5f0870ef34 Expose the matcher predicate from fancy stylizer 2018-06-03 22:26:55 -05:00
Evan Driscoll
860661987f Spaces after commas (in [1, 2]) is controllable separately from multiline 2018-06-03 00:02:49 -05:00
Evan Driscoll
e7b02c10dd Spaces after a colon (in {"k": v}) controllable separately from multiline 2018-06-03 00:00:12 -05:00
Evan Driscoll
ec756e47ad Refactor: don't indent when multiline is false 2018-06-02 23:52:30 -05:00
Evan Driscoll
af8dd92a0c Refactor: introduce explicit multiline control
Instead of depending on indent_step
2018-06-02 23:48:26 -05:00
Evan Driscoll
ef679f8988 Fancy serializer: styles continue to propagate if not overridden
This is half a bug fix half just continuing work from befor
2018-06-02 23:17:42 -05:00
Evan Driscoll
186c7df25a Can style subobjects of a object differently, by key 2018-06-02 23:10:28 -05:00
Evan Driscoll
28e7eecf33 Fancy serializer can limit recursion depth
Elides objects with ... if that limit is exceeded
2018-06-02 22:22:24 -05:00
Evan Driscoll
cd0c225a50 Use raw literals for multi-line expected results
Prettyfies the test cases a bit, though there is a utiliity function
needed now.
2018-06-02 22:10:16 -05:00
Evan Driscoll
1c1c789084 Serializer edge case bug fix: very deep indents ignored indent_char 2018-06-02 21:34:55 -05:00
Evan Driscoll
0500d41fbb TODO note 2018-06-02 20:18:55 -05:00
Evan Driscoll
d54f4653ed It's now possible to limit the size of strings 2018-06-02 02:09:04 -05:00
Evan Driscoll
003f3e298b Introduce fancy_serializer_style 2018-06-02 01:18:55 -05:00
Evan Driscoll
e38b4e8031 Re-support indentation in fancy_serializer 2018-06-02 01:07:25 -05:00
Evan Driscoll
a2231324e9 Start reworking fancy serialization tests 2018-06-01 23:41:15 -05:00
Evan Driscoll
607b973035 Fancy Serialization: copy serializer to fancy_serializer
1. Copy header and rename; add to Makefile; amalgamate
2. Add as friend to basic_json
3. Copy operator<< to 'fancy_dump' and simplify
4. Change test to refer to that
2018-06-01 23:13:49 -05:00
Evan Driscoll
b584000e7c Fancy serialiaztion: copy old serialization test file
Just copy unit-serialization to unit-fancy-serialization
2018-06-01 23:12:04 -05:00