diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-07-04 13:34:15 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-07-04 13:34:15 +0200 |
commit | beaf3e90aff14664b98f2c7ab7387c9fa4354fd1 (patch) | |
tree | cc1bab6524c7e616697efbae788e4b997a3213c4 /doc/manual | |
parent | e82951fe23daa961ef18b0c5cc9ba1f5d8906186 (diff) |
Add builtin function ‘fromJSON’
Fixes #294.
Diffstat (limited to 'doc/manual')
-rw-r--r-- | doc/manual/builtins.xml | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/manual/builtins.xml b/doc/manual/builtins.xml index 6a472291c..b289c6f0e 100644 --- a/doc/manual/builtins.xml +++ b/doc/manual/builtins.xml @@ -257,6 +257,22 @@ stdenv.mkDerivation { </varlistentry> + <varlistentry><term><function>builtins.fromJSON</function> <replaceable>e</replaceable></term> + + <listitem><para>Convert a JSON string to a Nix + value. For example, + +<programlisting> +builtins.fromJSON ''{"x": [1, 2, 3], "y": null}'' +</programlisting> + + returns the value <literal>{ x = [ 1 2 3 ]; y = null; + }</literal>. Floating point numbers are not + supported.</para></listitem> + + </varlistentry> + + <varlistentry><term><function>builtins.getAttr</function> <replaceable>s</replaceable> <replaceable>set</replaceable></term> @@ -762,6 +778,7 @@ in foo</programlisting> </varlistentry> + <varlistentry><term><function>builtins.toPath</function> <replaceable>s</replaceable></term> <listitem><para>Convert the string value |