-
-
Notifications
You must be signed in to change notification settings - Fork 313
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
lib: add grass JSON API #4801
base: main
Are you sure you want to change the base?
lib: add grass JSON API #4801
Conversation
Signed-off-by: Nishant Bansal <[email protected]>
Signed-off-by: Nishant Bansal <[email protected]>
Sorry for being slow on response! What you have come up with looks promising. But before we go into detail, there is structural change I'd prefer we should pursue. As this now stands, we will end up with two json libraries: |
To ensure we only have one JSON library (
This solution is based on my current understanding, and there may be better approaches. I welcome any input or guidance from other contributors on this. |
A possible way may be to (1) include/add the "gparson" API on top/together with current parson; (2) convert current user code to use gparson API; and (3) drop/rename current parson library to gparson (original parson API will unavoidably be accessible, but not encouraged–not part of GRASS API–a situation we will end up with in any case). Perhaps gjson would be a better name for GRASS json API library, thoughts anyone? Anonymising the backbone library, for future eventual freedom to change. |
Signed-off-by: Nishant Bansal <[email protected]>
I made some modifications and also added tests. Please take a look. |
I like the direction this is going (and I tested with an updated version of #4665, which passed on Mac and Win runner). Before moving forward–and to avoid doing changes back-and-forth–let us hear out the opinion of other dev team mates. In particular on the question of unit tests in library: should they be in-compilation tests (like lib/vector/diglib or lib/cdhc) or post-compilation tests (like lib/raster3d)? |
Can you provide some opinions here... |
Pull Request Description
Ref #4697
Purpose:
This PR addresses #4697 by adding the
gparson
wrapper for better JSON handling in GRASS GIS.Changes: