pub fn cap_json(value: Value, cap: &Cap) -> Value
Cap value at cap.max_bytes (exempt arrays aside) and keep it valid JSON. A reduced result carries "truncated": true and "original_bytes": n.
value
cap.max_bytes
"truncated": true
"original_bytes": n