-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Null value parsing #13
Comments
I think this is doable, I'm just not sure it follows the RFC: A GeoJSON object represents a Geometry, Feature, or collection of Features. o A GeoJSON object is a JSON object. I'm open to interpretation and suggestions, do you believe the RFC allows for a GeoJSON object to be null? Or is it trivial? |
It’s only model and business logic. I think it’s not related with RFC. I just want nullable (optional) property of GeoJson. It should have strong structure when content exist, but null is null, I think. |
Hey, I have tried library, it's awesome, but I have an issue with null value.
I have created my Dto object which has several GeoJson properties:
And JsonConvert.DeserializeObject failing when in the response property PinPossitions is null (some times here should be MultiPoint) :
Error is:
Newtonsoft.Json.JsonReaderException: Error reading JObject from JsonReader. Current JsonReader item is not an object: Null. Path '[0].PinPositions', line 1, position 41. at Newtonsoft.Json.Linq.JObject.Load (Newtonsoft.Json.JsonReader reader,...
If I removed that property from my response string, then deserialization success and PinPositions property in my dto is null. So I hoping that this case should be covered by library: don't try parse null value into GeoJson object.
Am I missing something? Maybe is better workaround than removing properties from content string before desereliazation? thanks in advance.
The text was updated successfully, but these errors were encountered: