r.geomorphon: changed the JSON output to use parson lib#7151
r.geomorphon: changed the JSON output to use parson lib#7151Dasux wants to merge 8 commits intoOSGeo:mainfrom
Conversation
476027e to
45fe3d2
Compare
|
please approve the workflows @echoix |
|
Needs an update for the CMake build |
|
yes...i see it--- that's on line 81... in |
|
I modified the path handling to ensure that grass is always picked up from where user installed it. |
I don't think that was the problem, you changed the dependencies in the makefile to add parson, but there wasn't an equivalent change in a CMakeLists.txt file. |
That makes sense..... I'll definitely look into it... Also, i'm curious, ... was this based on the specific error output from the CMake workflow? or is this a pattern you've seen before? |
|
Since we started to have the CMake build, each change of a makefile usually needs a CMakeLists equivalent. No CMake files were changed in this PR. Adding a dependency in the autotools-based build usually means the CMake build will need to reflect that too. |
|
I see, ... Also, I still kept the changes in |
|
I reverted |
|
i think all checks have passed @echoix .. can we merge this? |
I see there is an existing PR for this issue, but it has been inactive for some time...
This PR provides an updated implementation to move this issue forward.
This pr addresses #6970
I replaced the manual json formatting in
profile.cwith the grass parson wrapper (gjson). instead of printing json line by line using fprintf-style logic, i now create a root json object in memory and build the structure using theG_json_*api.I created the required json objects and arrays, add the key–value pairs to them, and then attach everything to the root object to preserve the original nesting structure. after the full structure is built, it is serialized using the pretty serializer and written to output.
The output remains functionally the same as before, but the implementation is now structured, easier to maintain, and aligned with grass's internal json utilities.
Please let me know if any other changes are required...
Output before parson integration (manual JSON)
Output after parson integration