Trait JsonScanner

Source
pub trait JsonScanner {
    // Required methods
    fn scan(&self, input: &[u8]) -> Result<ScanResult>;
    fn supports_simd(&self) -> bool;
    fn parse_numeric_array(
        &self,
        input: &[u8],
        dtype: NumericDType,
        length: Option<usize>,
    ) -> Result<JsonValue<'_>>;
    fn find_strings(&self, input: &[u8]) -> Result<Vec<StringLocation>>;
    fn find_structural_chars(&self, input: &[u8]) -> Result<Vec<usize>>;
}
Expand description

Main scanning interface implemented by SIMD and scalar scanners

Required Methods§

Source

fn scan(&self, input: &[u8]) -> Result<ScanResult>

Scan JSON input and return structural information

Source

fn supports_simd(&self) -> bool

Check if this scanner supports SIMD operations

Source

fn parse_numeric_array( &self, input: &[u8], dtype: NumericDType, length: Option<usize>, ) -> Result<JsonValue<'_>>

Parse numeric array with SIMD optimization if available

Source

fn find_strings(&self, input: &[u8]) -> Result<Vec<StringLocation>>

Find all string boundaries in the input

Source

fn find_structural_chars(&self, input: &[u8]) -> Result<Vec<usize>>

Find structural characters ({}[],:) positions

Implementors§