Dart DocumentationdartemporalInvalidJSONException

InvalidJSONException class

Exception to handle cases when json data provided to the .fromJson methods is not valid

class InvalidJSONException implements Exception {
 final String msg;

 const InvalidJSONException([this.msg]);

 String toString() => msg == null ? 'InvalidJSONException' : 'InvalidJSONException: ${msg}';
}

Implements

Exception

Constructors

const InvalidJSONException([String msg]) #

Creates a new Object instance.

Object instances have no meaningful state, and are only useful through their identity. An Object instance is equal to itself only.

docs inherited from Object
const InvalidJSONException([this.msg]);

Properties

final String msg #

final String msg

Methods

String toString() #

Returns a string representation of this object.

docs inherited from Object
String toString() => msg == null ? 'InvalidJSONException' : 'InvalidJSONException: ${msg}';