from

Function from 

Source
pub fn from<T>(value: &T) -> Result<Value>
where T: Serialize,
Expand description

Flatten a struct value

ยงExample

use serde::Serialize;

#[derive(Serialize)]
struct Person<'a> {
    name: &'a str,
    age: u8
}

let value = Person {
    name: "John Smith",
    age: 24
};

let result = jsonpointer_flatten::from(&value);