Repository navigation
FracturedJson table formatting - #2879
Conversation
|
Running tests. |
# Conflicts: # doc/builder.md # include/simdjson/dom/fractured_json-inl.h # include/simdjson/dom/fractured_json.h # include/simdjson/internal/fractured_formatter.h # tests/dom/nan_inf_tests.cpp # tests/fractured_json_tests.cpp
| * Placement of commas relative to column padding in table-formatted rows | ||
| * (default: before_padding_except_numbers). | ||
| */ | ||
| table_comma_placement comma_placement = table_comma_placement::before_padding_except_numbers; |
There was a problem hiding this comment.
I wasn't sure about naming since I can't call both table_comma_placement
There was a problem hiding this comment.
Same for number_alignment
|
If preferred I can move the follow up commits into a separate PR. They can also just be cherry picked separately. Features we don't have from the latest released version
I personally don't need any of these missing features so I will probably not continue work on this beyond this PR aside from fixing edge cases if I happen to run into them. |
|
@maxbachmann I am reviewing. Note that this PR is possibly the last one before our upcoming major release. |
|
@maxbachmann Please consider maxbachmann#1 If you are good with all that, I would stop there, and release a major simdjson version. |
- fix the example output (keys in first-occurrence order, no simple bracket padding, aligned columns) - enable_table_format no longer requires identical keys; describe the merged columns and the fallback behavior - clarify max_table_row_complexity and min_compact_array_row_items - fix the nested_bracket_padding examples - list the comma_placement and number_alignment values - note which FracturedJson options are unsupported, that the default number alignment differs, and that min_table_rows and table_similarity_threshold were removed
This is based on top of #2878 and updates the table formatting to be closer to FracturedJson. This is a pretty large change, but it wasn't really simple to break this down further since the table and compact array formatting all do the same recursive alignment things.
Aside from unsupported options and presumably some edge cases we should now match the behavior of FracturedJson:
Follow up commits: