Enum json::JsonValue
[−]
[src]
pub enum JsonValue { String(String), Number(f64), Boolean(bool), Null, Object(BTreeMap<String, JsonValue>), Array(Vec<JsonValue>), }
Variants
String(String)
Number(f64)
Boolean(bool)
Null
Object(BTreeMap<String, JsonValue>)
Array(Vec<JsonValue>)
Methods
impl JsonValue
[src]
fn new_object() -> JsonValue
fn new_array() -> JsonValue
fn is_string(&self) -> bool
fn as_string(&self) -> JsonResult<&String>
fn is_number(&self) -> bool
fn as_number(&self) -> JsonResult<&f64>
fn is_boolean(&self) -> bool
fn is_true(&self) -> bool
fn is_false(&self) -> bool
fn as_boolean(&self) -> JsonResult<&bool>
fn is_null(&self) -> bool
fn is_object(&self) -> bool
fn is_array(&self) -> bool
fn put<T>(&mut self, key: &str, value: T) -> JsonResult<()> where T: Into<JsonValue>
fn get(&self, key: &str) -> JsonResult<&JsonValue>
fn get_mut(&mut self, key: &str) -> JsonResult<&mut JsonValue>
fn with(&mut self, key: &str) -> &mut JsonValue
fn push<T>(&mut self, value: T) -> JsonResult<()> where T: Into<JsonValue>
fn at(&self, index: usize) -> JsonResult<&JsonValue>
Trait Implementations
impl PartialEq for JsonValue
[src]
fn eq(&self, __arg_0: &JsonValue) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &JsonValue) -> bool
This method tests for !=
.