pub fn bounded_metadata_json(value: Value) -> String
Sanitize and encode metadata, replacing oversized results with a valid JSON truncation marker.