toJson method

Map<String, Object> toJson()

A JSON-serializable representation of this timestamp, in the same shape as the JS SDK's Timestamp.toJSON(). Read it back with Timestamp.fromJson.

Implementation

Map<String, Object> toJson() {
  return <String, Object>{
    'type': jsonType,
    'seconds': seconds,
    'nanoseconds': nanoseconds,
  };
}