diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-11-19 00:03:11 +0100 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-11-19 00:04:11 +0100 |
commit | 77c13cdf566ffedc70d8860571afae8a6d43b552 (patch) | |
tree | 80d2c35c450911d0401e8a95d28ff9d8904b53fc /doc/manual | |
parent | 285df765b91588e39d6f35a32e30b84c3cb5be75 (diff) |
Add a toJSON primop
Diffstat (limited to 'doc/manual')
-rw-r--r-- | doc/manual/builtins.xml | 12 | ||||
-rw-r--r-- | doc/manual/release-notes.xml | 5 |
2 files changed, 17 insertions, 0 deletions
diff --git a/doc/manual/builtins.xml b/doc/manual/builtins.xml index 395829798..6a472291c 100644 --- a/doc/manual/builtins.xml +++ b/doc/manual/builtins.xml @@ -750,6 +750,18 @@ in foo</programlisting> </varlistentry> + <varlistentry><term><function>builtins.toJSON</function> <replaceable>e</replaceable></term> + + <listitem><para>Return a string containing a JSON representation + of <replaceable>e</replaceable>. Strings, integers, 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.</para></listitem> + + </varlistentry> + <varlistentry><term><function>builtins.toPath</function> <replaceable>s</replaceable></term> <listitem><para>Convert the string value diff --git a/doc/manual/release-notes.xml b/doc/manual/release-notes.xml index 3db083870..37bb730f4 100644 --- a/doc/manual/release-notes.xml +++ b/doc/manual/release-notes.xml @@ -13,6 +13,11 @@ <itemizedlist> + <listitem> + <para>New built-in function: <function>builtins.toJSON</function>, + which returns a JSON representation of a value.</para> + </listitem> + <listitem><para><command>nix-setuid-helper</command> is gone.</para></listitem> |