-
-
Notifications
You must be signed in to change notification settings - Fork 167
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
JsonSerializationException: 'Required property 'properties' not found in JSON #131
Comments
Ran into the same problem today. Occurs e.g. when deserializing a very simple polygon geometry without any properties:
|
I think what you're asking is not to make the Tried to check the GeoJSON RFC on this matter, but it only says (see https://datatracker.ietf.org/doc/html/rfc7946#section-3.2):
I'm not fully sure if this is actually meant to require the "properties" member to be always present. But from a "common sense" point of view, I see no reason why one shouldn't allow it to be absent (in case the feature does not have any relevant properties). |
@janusw In such case, we default it to JSON null value? Many JSON serializer omits NULL value from the serialized JSON. |
This is fixed via #167 by now.
No, as you can see from the test case I added, the GeoJSON.Net/src/GeoJSON.Net.Tests/Feature/FeatureTests.cs Lines 32 to 41 in 36be431
|
@xfischer I think this issue can and should be closed (I don't have the necessary permissions do close it). |
@janusw I gave you the permissions as you've undoubtly gained the maintainer status ;) |
Awesome, thanks! 👍 |
Hi,
Please allow Properties property to be nullable in JSON.
The text was updated successfully, but these errors were encountered: