toJson method

String toJson({
  1. bool withIndent = false,
})

Converts to an encoded JSON.

Implementation

String toJson({bool withIndent = false}) =>
    encodeJSON(toJsonMap(), withIndent: withIndent);