Converts the object to a JSON representation.
@override Map<String, dynamic> toJson() { return { for (final entry in value.entries) entry.key.toJson(): entry.value.toJson() }; }