json static method
Log json data message to the console.
It will only print if your app's environment is in debug mode.
You can override this by setting alwaysPrint = true.
Implementation
static void json(dynamic message, {bool alwaysPrint = false}) {
bool canPrint = (getEnv('APP_DEBUG', defaultValue: true));
if (!canPrint && !alwaysPrint) return;
try {
log(jsonEncode(message));
} on Exception catch (e) {
NyLogger.error(e.toString());
}
}