Enum no_proto::json_flex::NP_JSON[][src]

pub enum NP_JSON {
    String(String),
    Integer(i64),
    Float(f64),
    Dictionary(JSMAP),
    Array(Vec<NP_JSON>),
    Null,
    False,
    True,
}

Represents an JSON value

Variants

String(String)

String JSON type

Integer(i64)

Integer JSON type

Float(f64)

Float JSON type

Dictionary(JSMAP)

Map JSON type

Array(Vec<NP_JSON>)

List JSON type

Null

NULL json type

False

boolean false type

True

boolean true type

Implementations

impl NP_JSON[src]

pub fn clone(&self) -> NP_JSON[src]

copy this value and it's children

pub fn into_string(&self) -> Option<&String>[src]

Get this value as a string

pub fn into_i64(&self) -> Option<&i64>[src]

Get this value as an i64

pub fn into_f64(&self) -> Option<&f64>[src]

Get this value as an f64

pub fn into_hashmap(&self) -> Option<&JSMAP>[src]

Get this value as a hashmap

pub fn into_vec(&self) -> Option<&Vec<NP_JSON>>[src]

Get this value as a list

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

Check if this value is null

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

Check if this value is boolean true

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

Check if this value is boolean false

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

Check if this value is array

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

Check if this value is map

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

Check if this value is string

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

Check if this value is an integer

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

Check if this value is float

pub fn unwrap_string(&self) -> Option<&String>[src]

Get a reference to the string in this value if it's a string

pub fn unwrap_i64(&self) -> Option<&i64>[src]

Get a reference to the i64 in this value if it's a i64

pub fn unwrap_f64(&self) -> Option<&f64>[src]

Get a reference to the f64 in this value if it's a f64

pub fn unwrap_hashmap(&self) -> Option<&JSMAP>[src]

Get a reference to the hashmap in this value if it's a hashmap

pub fn unwrap_vec(&self) -> Option<&Vec<NP_JSON>>[src]

Get a reference to the list in this value if it's a list

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

Stringify this JSON object and it's children

Trait Implementations

impl Clone for NP_JSON[src]

impl Debug for NP_JSON[src]

impl<'a> Index<&'a str> for NP_JSON[src]

type Output = NP_JSON

The returned type after indexing.

impl Index<String> for NP_JSON[src]

type Output = NP_JSON

The returned type after indexing.

impl Index<usize> for NP_JSON[src]

type Output = NP_JSON

The returned type after indexing.

impl PartialEq<NP_JSON> for NP_JSON[src]

impl StructuralPartialEq for NP_JSON[src]

Auto Trait Implementations

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.