toJson abstract method

Map<String, dynamic> toJson()

Abstract function that concrete classes must implement. This must encode the internal data model to a JSON compatible representation.

While not required, it is suggested to call removeNull before returning.

Implementation

Map<String, dynamic> toJson();