1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
//! babbel_json - A lightweight, modular JSON toolkit for Rust
//!
//! This library provides a flexible JSON implementation with:
//! - Core Node type for representing JSON structures
//! - Parser to build Node trees from streams
//! - Multiple format serializers (JSON, YAML, XML, Bencode)
//! - File and buffer I/O abstractions (with `file-io` feature)
//! - Pretty-printing utilities
//! - Unicode-aware file handling (with `file-io` feature)
//!
//! ## no_std Support
//!
//! This library supports `no_std` environments with the `alloc` crate.
//! Disable default features and enable only what you need:
//!
//! ```toml
//! [dependencies]
//! babbel_json = { version = "0.1", default-features = false, features = ["alloc"] }
//! ```
//!
//! Minimum supported Rust version: 1.88.0
extern crate alloc;
/// Module defining error types and handling for JSON operations.
// Re-export ParseError for convenience
pub use ParseError;
/// Module handling JSON file reading and writing operations
/// Module providing input/output operations for reading and writing JSON data
/// Module containing utility functions and helpers for JSON processing
/// Module containing JSON data structure definitions and node types
/// Module implementing JSON parsing and value extraction
/// Module for converting JSON structures to formatted strings
// Re-export pretty printing for convenience
pub use stringify_pretty;
/// Macros for convenient JSON construction
// Re-export macro helper functions so macros can access them via $crate
pub use ;
/// Embedded systems utilities and helpers
/// Integration tests module
/// This enum represents different Unicode text file formats with their corresponding byte order marks (BOM)
pub use Format;
/// This function detects the Unicode format of a text file by examining its byte order mark (BOM)
pub use detect_format;
/// This function reads a text file and returns its content as a String, handling different Unicode formats
pub use read_file_to_string;
/// This function writes a string to a file in the specified Unicode format
pub use write_file_from_string;
///
/// babbel_json API
///
/// Returns the current version of the JSON library
pub use get_version as version;
/// Prints a formatted string to the destination.
pub use print;
/// Strip whitespace from a string.
pub use strip as strip_whitespace;
/// Destination implementation for writing JSON data to a memory buffer
pub use Buffer as BufferDestination;
/// Zero-allocation stack-based destination implementations
pub use ;
/// Streaming zero-allocation pull parser for embedded systems
pub use ;
/// Destination implementation for writing JSON data to a file
pub use File as FileDestination;
/// Source implementation for reading JSON data from a memory buffer
pub use Buffer as BufferSource;
/// Source implementation for reading JSON data from a file
pub use File as FileSource;
/// Core data structure representing a JSON node and numerical node in the parsed tree
pub use Node;
/// Core data structure representing a numeric value node in the parsed tree
pub use Numeric;
/// Parser configuration for controlling resource limits
pub use ParserConfig;
/// Convenience function to parse JSON from bytes
pub use from_bytes;
/// Convenience function to parse JSON from a string
pub use from_str;
/// Parses json data into a Node tree structure
pub use parse;
/// Parses json data with custom configuration for resource limits
pub use parse_with_config;
/// Parser statistics for profiling and memory tracking
pub use ParseStats;
/// Validates JSON syntax without allocating memory
pub use validate_json;
// Performance-optimized parsing and stringification
/// Arena allocator for reduced allocation overhead
pub use arena;
/// Fast parsing utilities with SIMD optimizations
pub use fast;
/// Small String Optimization for reduced heap allocations
pub use sso;
/// Optimized stringify with lazy string escaping
pub use stringify_optimized;
/// Converts a Node tree to Bencode format
pub use stringify as to_bencode;
/// Converts a Node tree back to JSON format
pub use stringify;
/// Converts a Node tree to TOML format
pub use stringify as to_toml;
/// Converts a Node tree to XML format
pub use stringify as to_xml;
/// Converts a Node tree to YAML format
pub use stringify as to_yaml;
// JSON Pointer support (RFC 6901)
/// Gets a value from a Node using a JSON Pointer string
pub use get as pointer_get;
/// Gets a mutable reference to a value using a JSON Pointer string
pub use get_mut as pointer_get_mut;
/// Removes a value from a Node using a JSON Pointer string
pub use remove as pointer_remove;
/// Sets a value in a Node using a JSON Pointer string
pub use set as pointer_set;
// Advanced features (Phase 13)
/// JSON Schema validation
pub use schema;
/// JSON Patch (RFC 6902)
pub use patch;
/// JSON Merge Patch (RFC 7386)
pub use merge_patch;
/// JSON5 comment stripping
pub use json5;
/// Line-delimited JSON (JSON Lines / NDJSON) streaming reader and writer
pub use ;