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

Add JSON and YAML C library dependency #3020

Closed
27 of 46 tasks
cwhite911 opened this issue Jun 5, 2023 Discussed in #3019 · 13 comments
Closed
27 of 46 tasks

Add JSON and YAML C library dependency #3020

cwhite911 opened this issue Jun 5, 2023 Discussed in #3019 · 13 comments
Assignees
Milestone

Comments

@cwhite911
Copy link
Contributor

cwhite911 commented Jun 5, 2023

Discussed in #3019

Originally posted by cwhite911 June 5, 2023
In an effort add additional output data formats to modules (e.g., r.report, r.info, etc..) we are discussing adding new library dependencies to aid in JSON and YAML encoding.

Please share your feedback on the following candidate dependencies.

JSON

parson
https://github.com/kgabis/parson/
Current release: 1.5.2 (2023)

Parson is a lightweight json library written in C.

  • Linux
  • Windows
  • Mac OSX

YAML

libyaml
https://github.com/yaml/libyaml
Current release: 1.2.2 (2021-10-01)

LibYAML is a YAML parser and emitter library.

  • Linux
  • Windows
  • Mac OSX

Related Issues and PRs

Candidate Modules

Which modules should have JSON & YAML output support?

General

Raster

3d Raster

  • etc..

Vector

Database

JSON output support without a library

@florisvdh
Copy link

Adding here that the preferred JSON encoding for g.proj output would be the PROJJSON specification: https://proj.org/en/latest/specifications/projjson.html. It's a JSON encoding of WKT2:2019.

@nilason
Copy link
Contributor

nilason commented Aug 3, 2024

@cwhite911 could this be closed?

@cwhite911
Copy link
Contributor Author

@cwhite911 could this be closed?

@nilason I'm still using this issue to track all the work getting done implementing json outputs. I'm happy to close this issue and move this somewhere else if you have a good suggestion.

@wenzeslaus
Copy link
Member

The original issue was solved. Let's create a new issue or I can create a project.

@cwhite911
Copy link
Contributor Author

A project would be nice to keep track of this.

@cwhite911 cwhite911 self-assigned this Oct 29, 2024
@neteler neteler added this to the 8.5.0 milestone Oct 29, 2024
@NishantBansal2003
Copy link
Contributor

Hey @cwhite911 @wenzeslaus , has JSON support been added to all the required modules, or are there still some modules left that need JSON support? If so, please let me know—I would love to contribute in this area!

@wenzeslaus
Copy link
Member

Project to track it created a couple days ago: https://github.com/orgs/OSGeo/projects/10

@wenzeslaus wenzeslaus moved this to Done in GRASS JSON Outputs Nov 4, 2024
@cwhite911
Copy link
Contributor Author

@NishantBansal2003 any of the above tools that do not have an associated PR would be good to include. I also have some schema improvements in mind for some of the existing json enabled modules that I can make issues for.

@NishantBansal2003
Copy link
Contributor

@NishantBansal2003 any of the above tools that do not have an associated PR would be good to include. I also have some schema improvements in mind for some of the existing json enabled modules that I can make issues for.

Sure, I’ll look into this. Meanwhile, could you create issues for some schema improvements in the existing JSON-enabled modules? I’ll review them and work on the fixes. Thanks

@wenzeslaus
Copy link
Member

I don't have the analysis for the schema. I wish. From my perspective, that's up for grabs if you feel like it. I noticed that r.univar always outputs a list of objects, but for one input, it seems to me it should output a single object. That's a one clear issue I noticed.

@echoix
Copy link
Member

echoix commented Nov 6, 2024

I don't have the analysis for the schema. I wish. From my perspective, that's up for grabs if you feel like it. I noticed that r.univar always outputs a list of objects, but for one input, it seems to me it should output a single object. That's a one clear issue I noticed.

From a data parsing point of view, as json would be targeted around tool usage, it would be a nightmare to use if the schema/outputted format changed shape depending on the number of inputs. If it can be one or more, the. It should always be a list, and even empty if there is nothing.

@NishantBansal2003
Copy link
Contributor

NishantBansal2003 commented Nov 6, 2024

Hi @wenzeslaus and @cwhite911! It looks like v.colors.out currently doesn’t support JSON output. Do we want the JSON output format to match the format used in the JSON output of r.colors.out?

Would you prefer that I open an issue for discussion first, or should I go ahead and create a PR?

@petrasovaa
Copy link
Contributor

Hi @wenzeslaus and @cwhite911! It looks like v.colors.out currently doesn’t support JSON output. Do we want the JSON output format to match the format used in the JSON output of r.colors.out?

Would you prefer that I open an issue for discussion first, or should I go ahead and create a PR?

Sounds like discussing it in an issue might be better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

8 participants