pub struct JsonPathParser { /* private fields */ }Expand description
Parses and evaluates JSON path expressions
Implementations§
Source§impl JsonPathParser
impl JsonPathParser
Sourcepub fn extract(&self, value: &Value) -> Result<Vec<Value>>
pub fn extract(&self, value: &Value) -> Result<Vec<Value>>
Extract values from a JSON object using this path
Returns a vector of values. For paths with wildcards, may return multiple values.
Sourcepub fn extract_single(&self, value: &Value) -> Result<Value>
pub fn extract_single(&self, value: &Value) -> Result<Value>
Extract a single value from a JSON object, returning an error if not found
Trait Implementations§
Source§impl Clone for JsonPathParser
impl Clone for JsonPathParser
Source§fn clone(&self) -> JsonPathParser
fn clone(&self) -> JsonPathParser
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for JsonPathParser
impl Debug for JsonPathParser
Auto Trait Implementations§
impl Freeze for JsonPathParser
impl RefUnwindSafe for JsonPathParser
impl Send for JsonPathParser
impl Sync for JsonPathParser
impl Unpin for JsonPathParser
impl UnwindSafe for JsonPathParser
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more