[][src]Struct json_structural_diff::JsonDiff

pub struct JsonDiff {
    pub score: f64,
    pub diff: Option<Value>,
}

Auxiliary structure to encapsulate data about the structural difference of two JSON files.

Fields

score: f64

Quantifies the difference between two JSON files.

If 0.: the two JSON files are entirely different one from the other. If 100.: the two JSON files are identical.

diff: Option<Value>

The JSON structural difference of two JSON files.

If None: the two JSON files are identical.

Implementations

impl JsonDiff[src]

pub fn diff(json1: &Value, json2: &Value, keys_only: bool) -> Self[src]

Finds the JSON structural difference of two JSON files.

pub fn diff_string(
    json1: &Value,
    json2: &Value,
    keys_only: bool
) -> Option<String>
[src]

Finds the JSON structural difference of two JSON files and returns it as a formatted string.

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, 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.