Struct arya::JsonBuilder[][src]

pub struct JsonBuilder { /* fields omitted */ }

a string builder for json that can repair and complete incomplete ("damaged") json.

remarks

unlike the JsonVerifier, adding a sequence of characters that would make the underlying json object invalid will cause the JsonBuilder to remain invalid, even if more characters are added to it later.

examples

let mut builder = JsonBuilder::new();

builder.update(r#"{
    "name": "annie",
    "age": 14,
    "parents": {
        "mother": null,
        "bro
"#);

builder.update("ken");

builder.completed_string();
// => Ok({
// =>     "name": "annie",
// =>     "age": 14,
// =>     "nested": {
// =>         "mother": null
// =>     }
// => })

Methods

impl JsonBuilder
[src]

Auto Trait Implementations

impl Send for JsonBuilder

impl Sync for JsonBuilder