encodeJson abstract method

String encodeJson({
  1. Object encodeTime(
    1. DateTime time
    )?,
})

Encodes this element into a JSON string.

Any DateTime objects contained are encoded using encodeTime if provided, or otherwise using DateTime.toIso8601String() method.

Implementation

String encodeJson({Object Function(DateTime time)? encodeTime});