toJSON method

String toJSON()

Returns the object data as a string in JSON format.

Implementation

String toJSON() {
  return jsonEncode(asMap());
}