-
-
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
make Feature.properties optional #167
make Feature.properties optional #167
Conversation
janusw
commented
Jul 3, 2023
- up to now it was required, but could be null
- see https://www.newtonsoft.com/json/help/html/T_Newtonsoft_Json_Required.htm
- this should fix issue JsonSerializationException: 'Required property 'properties' not found in JSON #131
@matt-lethargic @xfischer ping! |
@janusw ping acknowledged. Can you add tests to this PR to make sure a Feature with properties and without properties is properly handled ? |
Thanks for the reply 😆
Yeah, good point. I see that there is a
I also tried on the command line (on MacOS), but this gives me:
Any advice? What am I doing wrong? How do you run the tests, @xfischer? |
Mmmh, I don't have a mac hanging around, so I cannot reproduce. I'll test on Windows |
Also it would be nice to have some CI to do automatic builds and tests for every PR. I see that you have some Azure-based CI on master, but I cannot access this, and it doesn't seem to run on the PRs. Would you accept a GitHub-Actions CI setup, if I'd contribute it? Or do you prefer to stick to Azure? (One can also have both in parallel.) |
Yes, that would be great ! @matt-lethargic is it OK for you ? |
Actually it seems there is some draft GHA setup already: https://github.com/GeoJSON-Net/GeoJSON.Net/blob/master/.github/workflows/main.yml However, it would currently only run on a hypothetic 'v2' branch (which does not exist). I can take that as a starting point and create a working setup from there ... |
Actually testing the full sln seems to work well! 🥳
|
* up to now it was required, but could be null
89fae47
to
102a7b8
Compare
By now I added a small test case that verifies that a feature without any properties is deserialized alright. Is the PR ok with this addition? |
... and GitHub Actions verified that it works well and all tests succeed.
@matt-lethargic @xfischer Ping! |
More than happy to move to GH Actions, the setup we had pre-dates them by a lot. |
IMHO the most important part would be to build a nupkg in every GHA build, and make it available as an artifact. That should be pretty simple, and I can take care of it. Once that is done, pushing such a pkg to nuget.org (for a release tag) is a relatively small step that is easy to do manually But, yes, one can also automate that. In any case, all of this is orthogonal to this PR, which contains a simple one-line fix (with a simple test case). |
See PR #175. |