diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-02-12T11·49+0100 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-02-12T11·49+0100 |
commit | b3e8d72770b4100843c60b35633e529e6e69d543 (patch) | |
tree | f50070c3c31dd862b837bb514a9e0b10e68216a1 /src/libexpr/value-to-json.cc | |
parent | ae4a3cfa030438ca05ad3bf61fa301dee6c1dbb5 (diff) | |
parent | 5cdcaf5e8edd6679f667502eec421ac4e725d4ef (diff) |
Merge pull request #762 from ctheune/ctheune-floats
Implement floats
Diffstat (limited to 'src/libexpr/value-to-json.cc')
-rw-r--r-- | src/libexpr/value-to-json.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libexpr/value-to-json.cc b/src/libexpr/value-to-json.cc index b0cf85e21f18..47ee324a6e4f 100644 --- a/src/libexpr/value-to-json.cc +++ b/src/libexpr/value-to-json.cc @@ -84,6 +84,10 @@ void printValueAsJSON(EvalState & state, bool strict, v.external->printValueAsJSON(state, strict, str, context); break; + case tFloat: + str << v.fpoint; + break; + default: throw TypeError(format("cannot convert %1% to JSON") % showType(v)); } |