Object to Map serializer
@override Map<String, dynamic> toJson() { return { '@type': 'customRequestResult', if (extra != null) '@extra': extra, 'result': result }; }