Skip to main content

compare_json

Function compare_json 

Source
pub fn compare_json(a: &Value, b: &Value) -> Ordering
Expand description

Total order over JSON values for sorting.

NULLs sort first; numbers compare exactly (integers past 2^53 and integer/float pairs without rounding); strings lexicographically; mixed or composite values fall back to their rendered form so the ordering stays deterministic and total.