json static method
void
json(
- dynamic object
Logs a formatted JSON object with visual separators.
This method creates a visually distinct log entry for JSON or complex objects, using separators and special formatting to make the output easily readable. The object is logged as a fatal level message with no method count and clear visual boundaries.
object The object to be logged, typically a Map, List, or any JSON-serializable object
Example usage:
Console.json({'user': 'john', 'status': 'active', 'permissions': ['read', 'write']});
// Output:
// ==================================================
// {user: john, status: active, permissions: [read, write]}
// ==================================================
Implementation
static void json(dynamic object) {
Log.w(
JsonEncoder.withIndent(' ').convert(object),
level: LogLevel.FINE,
);
}