Skip to main content

vexy_json/
lib.rs

1// this_file: src/lib.rs
2// Main vexy_json library that re-exports core functionality
3
4//! # vexy_json
5//!
6//! A forgiving JSON parser with support for relaxed JSON syntax.
7//!
8//! This crate provides a JSON parser that accepts relaxed JSON syntax including:
9//! - Comments (single-line and multi-line)
10//! - Trailing commas
11//! - Unquoted object keys
12//! - Single-quoted strings
13//! - And more forgiving features
14//!
15//! ## Quick Start
16//!
17//! ```rust
18//! use vexy_json::parse;
19//!
20//! let result = parse(r#"{"key": "value"}"#).unwrap();
21//! ```
22
23// Re-export core functionality
24pub use vexy_json_core::{parse, parse_with_options, Error, Lexer, ParserOptions, Result};
25
26// Re-export streaming functionality
27pub use vexy_json_core::{
28    NdJsonParser, SimpleStreamingLexer, StreamingEvent, StreamingParser, StreamingValueBuilder,
29};
30
31// Re-export AST types
32pub use vexy_json_core::ast::{Number, Token, Value};
33
34// Re-export error types
35pub use vexy_json_core::error::{Error as ParseError, Result as ParseResult, Span};
36
37// Re-export serde functionality if feature is enabled
38#[cfg(feature = "serde")]
39pub use vexy_json_serde::*;