query
On this page

toJSON

lib.generators.toJSON

Docs pulled from | This Revision | 18 days ago


Nixpkgs manual

Generates JSON from an arbitrary (non-function) value. For more information see the documentation of the builtin.

Inputs

Options

Empty set, there may be configuration options in the future

Value

The value to be converted to JSON

Nix manual

Return a string containing a JSON representation of e. Strings, integers, floats, booleans, nulls and lists are mapped to their JSON equivalents. Sets (except derivations) are represented as objects. Derivations are translated to a JSON string containing the derivation’s output path. Paths are copied to the store and represented as a JSON string of the resulting store path.

Noogle detected

Implementation

The following is the current implementation of this function.

toJSON = { }: lib.strings.toJSON;