Skip to main content

Crate vexy_json

Crate vexy_json 

Source
Expand description

§vexy_json

A forgiving JSON parser with support for relaxed JSON syntax.

This crate provides a JSON parser that accepts relaxed JSON syntax including:

  • Comments (single-line and multi-line)
  • Trailing commas
  • Unquoted object keys
  • Single-quoted strings
  • And more forgiving features

§Quick Start

use vexy_json::parse;

let result = parse(r#"{"key": "value"}"#).unwrap();

Structs§

NdJsonParser
Parser for Newline-Delimited JSON streams
ParserOptions
Configuration options for the vexy_json parser.
SerdeValue
SimpleStreamingLexer
A simple streaming lexer for vexy_json
Span
Represents a span of text in the input for error reporting.
StreamingParser
State of the streaming parser
StreamingValueBuilder
Builder pattern for constructing values from events

Enums§

Error
Error types that can occur during vexy_json parsing.
Number
Represents a JSON number, which can be either an integer or floating point.
ParseError
Error types that can occur during vexy_json parsing.
StreamingEvent
Events emitted by the streaming parser
Token
Value
Represents any valid JSON value.

Functions§

parse
Parses a JSON string with default options (all forgiving features enabled).
parse_with_options
Parses a JSON string with custom options.

Type Aliases§

Lexer
Type alias for backward compatibility with the original Lexer API.
ParseResult
Convenience type alias for Results using vexy_json’s Error type.
Result
Convenience type alias for Results using vexy_json’s Error type.