pub struct ProcessingConfig {
pub separator: String,
pub lowercase_keys: bool,
pub filtering: FilteringConfig,
pub collision: CollisionConfig,
pub replacements: ReplacementConfig,
pub auto_convert_types: bool,
pub parallel_threshold: usize,
pub num_threads: Option<usize>,
pub nested_parallel_threshold: usize,
pub max_array_index: usize,
}Expand description
Comprehensive configuration for JSON processing operations
Fields§
§separator: StringSeparator for nested keys (default: “.”)
lowercase_keys: boolConvert all keys to lowercase
filtering: FilteringConfigFiltering configuration
collision: CollisionConfigCollision handling configuration
replacements: ReplacementConfigReplacement configuration
auto_convert_types: boolAutomatically convert string values to numbers and booleans
parallel_threshold: usizeMinimum batch size for parallel processing
num_threads: Option<usize>Number of threads for parallel processing (None = use system default)
nested_parallel_threshold: usizeMinimum object/array size for nested parallel processing within a single JSON document Only objects/arrays with more than this many keys/items will be processed in parallel Default: 100 (can be overridden with JSON_TOOLS_NESTED_PARALLEL_THRESHOLD environment variable)
max_array_index: usizeMaximum array index allowed during unflattening to prevent DoS via malicious keys Default: 100,000 (can be overridden with JSON_TOOLS_MAX_ARRAY_INDEX environment variable)
Implementations§
Source§impl ProcessingConfig
impl ProcessingConfig
Sourcepub fn from_json_tools(tools: &JSONTools) -> Self
pub fn from_json_tools(tools: &JSONTools) -> Self
Create a ProcessingConfig from a JSONTools builder instance
Source§impl ProcessingConfig
impl ProcessingConfig
Sourcepub fn lowercase_keys(self, enabled: bool) -> Self
pub fn lowercase_keys(self, enabled: bool) -> Self
Enable lowercase key conversion
Sourcepub fn filtering(self, filtering: FilteringConfig) -> Self
pub fn filtering(self, filtering: FilteringConfig) -> Self
Configure filtering options
Sourcepub fn collision(self, collision: CollisionConfig) -> Self
pub fn collision(self, collision: CollisionConfig) -> Self
Configure collision handling options
Sourcepub fn replacements(self, replacements: ReplacementConfig) -> Self
pub fn replacements(self, replacements: ReplacementConfig) -> Self
Configure replacement options
Trait Implementations§
Source§impl Clone for ProcessingConfig
impl Clone for ProcessingConfig
Source§fn clone(&self) -> ProcessingConfig
fn clone(&self) -> ProcessingConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProcessingConfig
impl Debug for ProcessingConfig
Auto Trait Implementations§
impl Freeze for ProcessingConfig
impl RefUnwindSafe for ProcessingConfig
impl Send for ProcessingConfig
impl Sync for ProcessingConfig
impl Unpin for ProcessingConfig
impl UnsafeUnpin for ProcessingConfig
impl UnwindSafe for ProcessingConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more