From beaf3e90aff14664b98f2c7ab7387c9fa4354fd1 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 4 Jul 2014 13:34:15 +0200 Subject: Add builtin function ‘fromJSON’ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #294. --- doc/manual/builtins.xml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'doc/manual') diff --git a/doc/manual/builtins.xml b/doc/manual/builtins.xml index 6a472291c363..b289c6f0ed4b 100644 --- a/doc/manual/builtins.xml +++ b/doc/manual/builtins.xml @@ -257,6 +257,22 @@ stdenv.mkDerivation { + builtins.fromJSON e + + Convert a JSON string to a Nix + value. For example, + + +builtins.fromJSON ''{"x": [1, 2, 3], "y": null}'' + + + returns the value { x = [ 1 2 3 ]; y = null; + }. Floating point numbers are not + supported. + + + + builtins.getAttr s set @@ -762,6 +778,7 @@ in foo + builtins.toPath s Convert the string value -- cgit 1.4.1