Open giorgio79 opened 1 year ago
Hi @giorgio79, it's not that difficult.
You can just set a custom fromJson
/ toJson
on the field of your serializable model.
For instance, my working example is:
@JsonKey(toJson: LocationHelper.geoFirePointToJson, fromJson: LocationHelper.geoFirePointFromJson)
GeoFirePoint? geoPoint;
Here you can find my LocationHelper
.
P.S.: @zeusbaba, I think you should close this issue as not relevant.
@emiliodallatorre LocationHelper isn't available in Flutter with this package. Can you provide its flutter code for serialization?
Anyone uses json serializable with GeoFlutterFire's GeoFirePoint?
I suspect we would need a custom JsonConverter for the data? Any tips or code samples?
The GeoPointConverter here works fine https://stackoverflow.com/questions/61707320/how-to-serialize-geopoint-using-dart-json-serializable-package , but here we have geohash too