simdjson 4.4.0
Ridiculously Fast JSON
Loading...
Searching...
No Matches
fractured_json.h
1#ifndef SIMDJSON_DOM_FRACTURED_JSON_H
2#define SIMDJSON_DOM_FRACTURED_JSON_H
3
4#include "simdjson/dom/base.h"
5#include "simdjson/dom/element.h"
6
7namespace simdjson {
8
22
27 size_t max_inline_length = 80;
28
35
42
46 size_t indent_spaces = 4;
47
54
58 size_t min_table_rows = 3;
59
66
73
77 size_t max_items_per_line = 10;
78
85
91 bool colon_padding = true;
92
98 bool comma_padding = true;
99};
100
111template <class T>
112std::string fractured_json(T x);
113
123template <class T>
124std::string fractured_json(T x, const fractured_json_options& options);
125
126#if SIMDJSON_EXCEPTIONS
127template <class T>
129
130template <class T>
131std::string fractured_json(simdjson_result<T> x, const fractured_json_options& options);
132#endif
133
149inline std::string fractured_json_string(std::string_view json_str);
150
154inline std::string fractured_json_string(std::string_view json_str,
155 const fractured_json_options& options);
156
157} // namespace simdjson
158
159#endif // SIMDJSON_DOM_FRACTURED_JSON_H
The top level simdjson namespace, containing everything the library provides.
Definition base.h:8
std::string fractured_json_string(std::string_view json_str)
Format a JSON string using FracturedJson formatting.
std::string fractured_json(T x)
Format JSON using FracturedJson formatting with default options.
Configuration options for FracturedJson formatting.
size_t max_compact_array_complexity
Maximum complexity for compact array formatting (default: 1).
bool simple_bracket_padding
Add space inside brackets for simple containers (default: true).
bool comma_padding
Add space after commas in inline content (default: true).
bool enable_table_format
Enable tabular formatting for arrays of similar objects (default: true).
size_t indent_spaces
Number of spaces per indentation level (default: 4).
bool colon_padding
Add space after colons (default: true).
size_t max_inline_length
Maximum length for inlined elements (default: 80).
size_t min_table_rows
Minimum number of rows to trigger table mode (default: 3).
size_t max_inline_complexity
Maximum nesting depth for inline rendering (default: 2).
size_t max_total_line_length
Maximum total characters per line (default: 120).
size_t max_items_per_line
Maximum array items per line in compact mode (default: 10).
bool enable_compact_multiline
Enable compact multiline arrays (default: true).
double table_similarity_threshold
Similarity threshold for table detection (default: 0.8).
The result of a simdjson operation that could fail.
Definition error.h:280