Skip to main content
Version: 2.8.x(Latest)

The gjson module implements powerful data encoding/parsing functions, supporting data hierarchy retrieval, dynamic creation and modification of Json objects, and features such as parsing and conversion of common data formats.

Features:

  1. Supports data hierarchy retrieval;
  2. Supports runtime data modification;
  3. Supports dynamic creation of hierarchical data structures and conversion to supported data formats;
  4. Supports conversion among JSON, XML, INI, YAML/YML, TOML, PROPERTIES, Struct data formats;
info

Note that the gjson package supports reading, writing, and conversion of multiple data formats, not limited to the json format.

Usage:

import "github.com/gogf/gf/v2/encoding/gjson"

API Documentation:

https://pkg.go.dev/github.com/gogf/gf/v2/encoding/gjson

Documentation