toJson method

String toJson({
  1. dynamic skipNulls = true,
})

Serialize a Td instance to a JSON string. If skipNulls is true the fields with null values are not serialized.

Implementation

String toJson({skipNulls = true}) {
  return jsonEncode(toMap(skipNulls: skipNulls));
}