discontinuedPackage json_schema2 has been discontinued and replaced by json_schema.

toJson method

String toJson()

JSON string represenatation of the schema.

Implementation

String toJson() => json.encode(_schemaMap ?? _schemaBool);