pub fn parse_fragments<'a>(remainder: &'a [u8], fragments: &mut Vec<JsonFragment<'a>>) {
    // Parse a literal
    let mut l = String::new();
    let remainder = literal(remainder, &mut l, true);
    if l.len() > 0 {
        fragments.push(JsonFragment::Literal(l));
    }

    // Parse a repl
    let (remainder, r) = repl(remainder);
    if r.len() > 0 {
        fragments.push(JsonFragment::Repl(r));
    }

    // If there's anything left, run again
    if remainder.len() > 0 {
        parse_fragments(remainder, fragments);
    }
}
/// Parse and sanitise the complete sequence as literals and replacements.
Parse and sanitise the complete sequence as literals and replacements.
Parse and sanitise the complete sequence as literals and replacements .
pub fn parse_fragments<'a>(remainder: &'a [u8], fragments: &mut Vec<JsonFragment<'a>>) {
    // Parse a literal
    let mut l = String::new();
    let remainder = literal(remainder, &mut l, true);
    if l.len() > 0 {
        fragments.push(JsonFragment::Literal(l));
    }
    // Parse a repl
    let (remainder, r) = repl(remainder);
    if r.len() > 0 {
        fragments.push(JsonFragment::Repl(r));
    }
    // If there's anything left, run again
    if remainder.len() > 0 {
        parse_fragments(remainder, fragments);
    }
}
pub fn parse_fragments < ' a > ( remainder : & ' a [ u8 ] , fragments : & mut Vec < JsonFragment < ' a > > ) { // Parse a literal let mut l = String :: new ( ) ; let remainder = literal ( remainder , & mut l , true ) ; if l . len ( ) > 0 { fragments . push ( JsonFragment :: Literal ( l ) ) ; } // Parse a repl let ( remainder , r ) = repl ( remainder ) ; if r . len ( ) > 0 { fragments . push ( JsonFragment :: Repl ( r ) ) ; } // If there's anything left, run again if remainder . len ( ) > 0 { parse_fragments ( remainder , fragments ) ; } }
Parse and sanitise the complete sequence as literals and replacements.
Parse and sanitise the complete sequence as literals and replacements .
remainder
&'a [u8]
fragments
&mut Vec<JsonFragment<'a>>
remainder
&'a [u8]
fragments
&mut Vec<JsonFragment<'a>>