forJsonView static method
Structure for the JSON viewer. Parses strings that contain JSON.
Implementation
static Object? forJsonView(Object? value) {
if (value is String) {
final decoded = tryDecode(value);
if (decoded != null) return sanitize(decoded);
return value;
}
return sanitize(value);
}