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/builtins.xml | |
parent | 285df765b91588e39d6f35a32e30b84c3cb5be75 (diff) |
Add a toJSON primop
Diffstat (limited to 'doc/manual/builtins.xml')
-rw-r--r-- | doc/manual/builtins.xml | 12 |
1 files changed, 12 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 |