Skip to content
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

v.info: add JSON support #3755

Merged
merged 8 commits into from
Jun 18, 2024
Merged

Conversation

kritibirda26
Copy link
Contributor

Builds on #3744

Use parson to add json output format support to the v.info module. The module has various flags to control the fields being output in case of plain format. The current prototype ignores the flags and always outputs all data for the JSON output.

vector/v.info/print.c Outdated Show resolved Hide resolved
@github-actions github-actions bot added vector Related to vector data processing raster Related to raster data processing Python Related code is in Python C Related code is in C module tests Related to Test Suite labels May 31, 2024
vector/v.info/local_proto.h Outdated Show resolved Hide resolved
vector/v.info/local_proto.h Outdated Show resolved Hide resolved
vector/v.info/print.c Outdated Show resolved Hide resolved
vector/v.info/print.c Outdated Show resolved Hide resolved
vector/v.info/print.c Outdated Show resolved Hide resolved
vector/v.info/print.c Outdated Show resolved Hide resolved
vector/v.info/print.c Outdated Show resolved Hide resolved
vector/v.info/print.c Outdated Show resolved Hide resolved
vector/v.info/print.c Outdated Show resolved Hide resolved
vector/v.info/print.c Outdated Show resolved Hide resolved
vector/v.info/testsuite/test_vinfo.py Outdated Show resolved Hide resolved
vector/v.info/testsuite/test_vinfo.py Outdated Show resolved Hide resolved
@echoix
Copy link
Member

echoix commented May 31, 2024

You can go in the files tab of the PR, and choose multiple suggestions to add in the same commit.

vector/v.info/local_proto.h Outdated Show resolved Hide resolved
vector/v.info/local_proto.h Outdated Show resolved Hide resolved
vector/v.info/print.c Outdated Show resolved Hide resolved
vector/v.info/print.c Outdated Show resolved Hide resolved
vector/v.info/print.c Outdated Show resolved Hide resolved
vector/v.info/print.c Outdated Show resolved Hide resolved
vector/v.info/print.c Outdated Show resolved Hide resolved
vector/v.info/print.c Outdated Show resolved Hide resolved
vector/v.info/print.c Outdated Show resolved Hide resolved
vector/v.info/print.c Outdated Show resolved Hide resolved
Copy link
Member

@wenzeslaus wenzeslaus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You started your new branch from your r.info one. One way to fix it is just to delete files.

@echoix
Copy link
Member

echoix commented Jun 4, 2024

Or follow instructions similar to #3763 (comment), I just walked through the same situation with another contributor a couple minutes ago

vector/v.info/main.c Outdated Show resolved Hide resolved
vector/v.info/print.c Outdated Show resolved Hide resolved
vector/v.info/print.c Outdated Show resolved Hide resolved
vector/v.info/print.c Outdated Show resolved Hide resolved
vector/v.info/print.c Outdated Show resolved Hide resolved
@neteler neteler changed the title Add JSON support to v.info v.info: add JSON support Jun 6, 2024
@github-actions github-actions bot added HTML Related code is in HTML docs labels Jun 7, 2024
vector/v.info/parse.c Outdated Show resolved Hide resolved
kritibirda26 and others added 4 commits June 16, 2024 14:42
Use parson to add json output format support to the v.info module. The module has
various flags to control the fields being output in case of plain format. The current
prototype ignores the flags and always outputs all data for the JSON output.
Co-authored-by: Vaclav Petras <wenzeslaus@gmail.com>
@kritibirda26
Copy link
Contributor Author

Hi! I have updated the PR.

vector/v.info/parse.c Outdated Show resolved Hide resolved
Copy link
Member

@wenzeslaus wenzeslaus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Let's go with this.

Copy link
Contributor

@cwhite911 cwhite911 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kritibirda26 Looks good!

@wenzeslaus wenzeslaus enabled auto-merge (squash) June 18, 2024 16:13
@wenzeslaus wenzeslaus merged commit f3204e7 into OSGeo:main Jun 18, 2024
23 of 24 checks passed
@neteler neteler added this to the 8.5.0 milestone Jun 19, 2024
@kritibirda26 kritibirda26 deleted the add-json-to-v-info branch June 19, 2024 18:45
cyliang368 pushed a commit to cyliang368/grass that referenced this pull request Jun 22, 2024
Use parson to have JSON as an output format support. The module has various flags to control the fields being output in case of plain shell format controlled by flags. All (-get) of these are enabled when using format=shell. format=plain now allows use of flags. This may need special handling in the future to resolve the edge cases in a better way.
@a0x8o a0x8o mentioned this pull request Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C Related code is in C docs HTML Related code is in HTML libraries module Python Related code is in Python raster Related to raster data processing tests Related to Test Suite vector Related to vector data processing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants