parseJSON method

dynamic parseJSON({
  1. Object? reviver(
    1. Object? key,
    2. Object? value
    )?,
})

Implementation

dynamic parseJSON({Object? Function(Object? key, Object? value)? reviver}) {
  try {
    if (this == null) {
      return null;
    }
    if (this!.isEmpty) {
      return this;
    }
    return jsonDecode(this!, reviver: reviver);
  } catch (_) {
    throw Exception('🛑 cant parseJSON');
  }
}