[][src]Enum json_minimal::Json

pub enum Json {
    JSON {
        value: Vec<Json>,
    },
    OBJECT {
        name: String,
        value: Vec<Json>,
    },
    ARRAY {
        name: String,
        value: Vec<ArrayVal>,
    },
    STRING {
        name: String,
        value: String,
    },
    NUMBER {
        name: String,
        value: f32,
    },
    BOOL {
        name: String,
        value: bool,
    },
    NULL {
        name: String,
    },
}

Variants

JSON

Fields of JSON

value: Vec<Json>
OBJECT

Fields of OBJECT

name: Stringvalue: Vec<Json>
ARRAY

Fields of ARRAY

name: Stringvalue: Vec<ArrayVal>
STRING

Fields of STRING

name: Stringvalue: String
NUMBER

Fields of NUMBER

name: Stringvalue: f32
BOOL

Fields of BOOL

name: Stringvalue: bool
NULL

Fields of NULL

name: String

Implementations

impl Json[src]

pub fn new() -> Json[src]

pub fn add_object(&mut self, name: String, value: Vec<Json>) -> &mut Json[src]

pub fn add_array(&mut self, name: String, value: Vec<ArrayVal>) -> &mut Json[src]

pub fn add_string(&mut self, name: String, value: String) -> &mut Json[src]

pub fn arr_add_string(&mut self, value: String)[src]

pub fn add_number(&mut self, name: String, value: f32) -> &mut Json[src]

pub fn arr_add_number(&mut self, value: f32)[src]

pub fn add_bool(&mut self, name: String, value: bool) -> &mut Json[src]

pub fn arr_add_bool(&mut self, value: bool)[src]

pub fn add_null(&mut self, name: String) -> &mut Json[src]

pub fn arr_add_null(&mut self)[src]

pub fn get(&self, name: &str) -> Option<&Json>[src]

pub fn arr_get(&self, which: usize) -> Option<&ArrayVal>[src]

pub fn get_mut(&mut self, name: &str) -> Option<&mut Json>[src]

pub fn arr_get_mut(&mut self, which: usize) -> Option<&mut ArrayVal>[src]

pub fn names_match(&self, name: &Vec<String>) -> bool[src]

pub fn form_matches(&self, reference: &Json) -> bool[src]

pub fn is_object(&self) -> bool[src]

pub fn is_array(&self) -> bool[src]

pub fn is_string(&self) -> bool[src]

pub fn is_number(&self) -> bool[src]

pub fn is_bool(&self) -> bool[src]

pub fn is_null(&self) -> bool[src]

pub fn print(&self) -> String[src]

pub fn pretty_print(&self) -> String[src]

Trait Implementations

impl Debug for Json[src]

impl PartialEq<Json> for Json[src]

impl StructuralPartialEq for Json[src]

Auto Trait Implementations

impl RefUnwindSafe for Json

impl Send for Json

impl Sync for Json

impl Unpin for Json

impl UnwindSafe for Json

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.