> This page is for Remediation Orchestrator.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/remediation-orchestrator/llms.txt.

# json

JSON encoding and decoding functions.

## Members

* [decode](#decode)
* [encode](#encode)
* [indent](#indent)

## decode

Decodes a JSON string into a Starlark value. JSON objects become dicts, arrays become lists.

JSON string to decode

Value to return if x cannot be decoded as JSON (optional)

Decoded Starlark value

## encode

Encodes a Starlark value as a JSON string. Supports None, bool, int, float, string, dict, list, tuple, and structs.

Value to encode as JSON

JSON-encoded string

## indent

Returns the indented form of a JSON-encoded string.

JSON string to indent

Prefix for each line (default: empty)

Indent string for each level (default: "\t")

Indented JSON string