[GRASS-git] [OSGeo/grass] c054ba: g.list: Add JSON output format (#5921)

Nishant Bansal noreply at github.com
Wed Jun 25 11:41:26 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/OSGeo/grass
  Commit: c054babbcccedca08cc1078d16ae20013c1b8d11
      https://github.com/OSGeo/grass/commit/c054babbcccedca08cc1078d16ae20013c1b8d11
  Author: Nishant Bansal <nishant.bansal.282003 at gmail.com>
  Date:   2025-06-25 (Wed, 25 Jun 2025)

  Changed paths:
    M general/CMakeLists.txt
    M general/g.list/Makefile
    M general/g.list/g.list.md
    M general/g.list/global.h
    M general/g.list/list.c
    M general/g.list/main.c
    M general/g.list/tests/g_list_test.py
    M general/g.list/testsuite/test_g_list.py

  Log Message:
  -----------
  g.list: Add JSON output format (#5921)

This adds JSON output format to the g.list tool.

* Adds a format option with plain, shell, and json modes for output formatting.
* The flags -m and -t apply only when format=shell.
* The flag -p is deprecated; use format=plain instead.
* The flag -f is also deprecated; use r.info and friends instead.
* Adds tests covering each of the new formats.
* Adds a Python example to the documentation for parsing JSON output.

Closes #5848

---------

Signed-off-by: Nishant Bansal <nishant.bansal.282003 at gmail.com>



To unsubscribe from these emails, change your notification settings at https://github.com/OSGeo/grass/settings/notifications


More information about the grass-commit mailing list