[Feat] Add JSON examples to tool documentation
This issue tracks the progress of JSON output documentation. Ideally, each tool supporting JSON format as output has an example of JSON output (potentially shortened if it's too long) and an example demonstrating the usage in the workflow, ideally in Python. These 2 could be combined. The goal is for users to quickly understand the schema of the output and know how to use it in Python...
Missing example of usage in Python:
- [ ] r.info needs a Python example, e.g. get min, max #5784
- [x] g.region needs a Python example, e.g. get latlon coordinates of the center of the region #5785
One option with the new documentation we could add content tabs for command line and Python, having the the same example for both interfaces.
Once PR https://github.com/OSGeo/grass/pull/3884/ is merged please add JSON examples to r.stats.
One option with the new documentation we could add content tabs for command line and Python, having the the same example for both interfaces.
Hey @petrasovaa, I added the docs in Markdown, but when I tried to follow the syntax mentioned above, the pre-commit check failed even though the content tabs were showing. After I fixed that, the content tabs didn’t show as expected. What should I do in this case? Should I stick to plain Markdown syntax instead of the MkDocs-specific syntax?
Can be closed, as it has already been addressed.