//! Small helpers shared by the compact models.
useserde_json::Value;/// Read a string field from a JSON object.
pubfnget_str<'a>(v:&'a Value, key:&str)->Option<&'astr>{
v.get(key).and_then(Value::as_str)}/// Whether a JSON value counts as defined: present and not null.
pubfnis_defined(v:Option<&Value>)->bool{matches!(v,Some(x)if!x.is_null())}