Struct inth_oauth2::client::response::JsonObjectHelper
[−]
[src]
pub struct JsonObjectHelper<'a>(pub &'a Object);
JSON object helper for response parsing.
Methods
impl<'a> JsonObjectHelper<'a>
fn get_string_option(&self, key: &'static str) -> Option<&'a str>
Gets a field as a string or returns None
.
fn get_string(&self, key: &'static str) -> Result<&'a str, ParseError>
Gets a field as a string or fails with ParseError::ExpectedFieldType
.
fn get_i64_option(&self, key: &'static str) -> Option<i64>
Gets a field as an i64 or returns None
.
fn get_i64(&self, key: &'static str) -> Result<i64, ParseError>
Gets a field as an i64 or fails with ParseError::ExpectedFieldType
.