Closed Thaina closed 6 years ago
It can be part of a third party NuGet package. There is no reason it needs to be inside Newtonsoft.Json
@JamesNK Sure it can be 3rd party. But I think it should be part of NewtonSoft
3rd party cannot extend enum JTokenType
. What I want is JTokenType.Geo
or something like that
NewtonSoft support unconventional JSON type in C# and I think it's great
But I would like to have more type support. At least
geopoint
andreference
to match with google protobuf. And so it would be easier to bridge things between Json in C# and ProtoBuf when use google serviceEspecially
geopoint
I think this type is common nowadayI had written conversion function with google protobuf for firestore Google.Cloud.Firestore.V1Beta1/Document.cs#L561. It almost map perfectly except these 2 types
geopoint
is just latitude/longitude andreference
is just special string to keep key of any formatI think we may hack the key to use
uri
type. Butgeopoint
was really needed to handleps. This is my bridge code
https://gist.github.com/Thaina/82071ca2814755ef3571fec352f2e44c