simdjson 4.4.0
Ridiculously Fast JSON
Loading...
Searching...
No Matches
simdjson::fractured_json_options Struct Reference

Configuration options for FracturedJson formatting. More...

#include <fractured_json.h>

Public Attributes

size_t max_total_line_length = 120
 Maximum total characters per line (default: 120).
 
size_t max_inline_length = 80
 Maximum length for inlined elements (default: 80).
 
size_t max_inline_complexity = 2
 Maximum nesting depth for inline rendering (default: 2).
 
size_t max_compact_array_complexity = 1
 Maximum complexity for compact array formatting (default: 1).
 
size_t indent_spaces = 4
 Number of spaces per indentation level (default: 4).
 
bool enable_table_format = true
 Enable tabular formatting for arrays of similar objects (default: true).
 
size_t min_table_rows = 3
 Minimum number of rows to trigger table mode (default: 3).
 
double table_similarity_threshold = 0.8
 Similarity threshold for table detection (default: 0.8).
 
bool enable_compact_multiline = true
 Enable compact multiline arrays (default: true).
 
size_t max_items_per_line = 10
 Maximum array items per line in compact mode (default: 10).
 
bool simple_bracket_padding = true
 Add space inside brackets for simple containers (default: true).
 
bool colon_padding = true
 Add space after colons (default: true).
 
bool comma_padding = true
 Add space after commas in inline content (default: true).
 

Detailed Description

Configuration options for FracturedJson formatting.

FracturedJson intelligently chooses between different layout strategies (inline, compact multiline, table, expanded) based on content complexity, length, and structure similarity.

Definition at line 16 of file fractured_json.h.

Member Data Documentation

◆ colon_padding

bool simdjson::fractured_json_options::colon_padding = true

Add space after colons (default: true).

When true: "key": "value" When false: "key":"value"

Definition at line 91 of file fractured_json.h.

◆ comma_padding

bool simdjson::fractured_json_options::comma_padding = true

Add space after commas in inline content (default: true).

When true: [1, 2, 3] When false: [1,2,3]

Definition at line 98 of file fractured_json.h.

◆ enable_compact_multiline

bool simdjson::fractured_json_options::enable_compact_multiline = true

Enable compact multiline arrays (default: true).

When enabled, arrays of simple elements may have multiple items per line.

Definition at line 72 of file fractured_json.h.

◆ enable_table_format

bool simdjson::fractured_json_options::enable_table_format = true

Enable tabular formatting for arrays of similar objects (default: true).

When enabled, arrays of objects with identical keys are formatted as aligned tables.

Definition at line 53 of file fractured_json.h.

◆ indent_spaces

size_t simdjson::fractured_json_options::indent_spaces = 4

Number of spaces per indentation level (default: 4).

Definition at line 46 of file fractured_json.h.

◆ max_compact_array_complexity

size_t simdjson::fractured_json_options::max_compact_array_complexity = 1

Maximum complexity for compact array formatting (default: 1).

Arrays with elements of this complexity or less may have multiple items per line.

Definition at line 41 of file fractured_json.h.

◆ max_inline_complexity

size_t simdjson::fractured_json_options::max_inline_complexity = 2

Maximum nesting depth for inline rendering (default: 2).

Elements with complexity exceeding this will be expanded. Complexity 0 = scalar, 1 = flat array/object, 2 = one level of nesting.

Definition at line 34 of file fractured_json.h.

◆ max_inline_length

size_t simdjson::fractured_json_options::max_inline_length = 80

Maximum length for inlined elements (default: 80).

Simple arrays/objects shorter than this may be rendered inline.

Definition at line 27 of file fractured_json.h.

◆ max_items_per_line

size_t simdjson::fractured_json_options::max_items_per_line = 10

Maximum array items per line in compact mode (default: 10).

Definition at line 77 of file fractured_json.h.

◆ max_total_line_length

size_t simdjson::fractured_json_options::max_total_line_length = 120

Maximum total characters per line (default: 120).

Content exceeding this will be expanded to multiple lines.

Definition at line 21 of file fractured_json.h.

◆ min_table_rows

size_t simdjson::fractured_json_options::min_table_rows = 3

Minimum number of rows to trigger table mode (default: 3).

Definition at line 58 of file fractured_json.h.

◆ simple_bracket_padding

bool simdjson::fractured_json_options::simple_bracket_padding = true

Add space inside brackets for simple containers (default: true).

When true: { "key": "value" } When false: {"key": "value"}

Definition at line 84 of file fractured_json.h.

◆ table_similarity_threshold

double simdjson::fractured_json_options::table_similarity_threshold = 0.8

Similarity threshold for table detection (default: 0.8).

Objects must share at least this fraction of keys to be formatted as a table.

Definition at line 65 of file fractured_json.h.


The documentation for this struct was generated from the following file: