Commit Graph

18 Commits

Author SHA1 Message Date
Evan Driscoll
af8dd92a0c Refactor: introduce explicit multiline control
Instead of depending on indent_step
2018-06-02 23:48:26 -05:00
Evan Driscoll
5e10e97296 Refactor: dump_object_key_value
This isn't as clean as I wanted -- there's a lot more context
than I realized -- but I think it's still an improvement and
will become even moreso later
2018-06-02 23:35:38 -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
7fa4431474 Refactor and prep: introduce new fancy_serializer_stylizer class
This will be able to provide multiple styles depending on context
2018-06-02 22:47:05 -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
1c1c789084 Serializer edge case bug fix: very deep indents ignored indent_char 2018-06-02 21:34:55 -05:00
Evan Driscoll
a983e47619 Refactor: dump_object no longer splits cases by indent 2018-06-02 21:08:53 -05:00
Evan Driscoll
9cdf54b886 Refactor: dump_array doesn't split cases for indent 2018-06-02 21:01:22 -05:00
Evan Driscoll
cc4206a718 West const to match existing code 2018-06-02 20:52:12 -05:00
Evan Driscoll
dafee1343c Refactor: dump tracks recursive depth, not indent size
This makes the depth independent of the indent_step and independent
of whether it's indenting at all
2018-06-02 20:51:26 -05:00
Evan Driscoll
f180227b6d Fancy serializer: Split object and array handling into functions 2018-06-02 20:30:12 -05:00
Evan Driscoll
7dbfe2459b Refactor: move string handling to dump_string 2018-06-02 20:15:07 -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
297ff8e53f Use primitive_serializer in fancy_serializer 2018-06-02 00:23:00 -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