about summary refs log tree commit diff
path: root/doc/manual
diff options
context:
space:
mode:
Diffstat (limited to 'doc/manual')
-rw-r--r--doc/manual/builtins.xml12
-rw-r--r--doc/manual/release-notes.xml5
2 files changed, 17 insertions, 0 deletions
diff --git a/doc/manual/builtins.xml b/doc/manual/builtins.xml
index 3958297989a1..6a472291c363 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 3db083870405..37bb730f4063 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>