encode static method
Encodes object to a Json String compatible with the GitHub API.
It should be used instead of jsonEncode.
Equivalent to jsonEncode except that
it converts DateTime to a proper String for the GitHub API,
and it also deletes keys associated with null values in maps before converting them.
The obtained String can be decoded using jsonDecode.
Implementation
static String encode(Object object, {String? indent}) {
final encoder = JsonEncoder.withIndent(indent, _toEncodable);
return encoder.convert(_checkObject(object));
}