toJSON abstract method

String toJSON({
  1. int indent = 0,
})

Converts the object to a JSON string representation.

The indent parameter specifies the number of spaces to use for indentation. Set indent to 0 or a negative value for no indentation.

Returns the JSON string representation of the object.

Implementation

String toJSON({int indent = 0});