From 3e1916a8d5ef59bc9413c71d305ab48963e7a789 Mon Sep 17 00:00:00 2001 From: arcoRocks <33952704+arcoRocks@users.noreply.github.com> Date: Mon, 19 Feb 2018 13:31:38 +0100 Subject: [PATCH 1/3] fix for #413 --- include/chaiscript/utility/json_wrap.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/chaiscript/utility/json_wrap.hpp b/include/chaiscript/utility/json_wrap.hpp index 05b9e404..980b54be 100644 --- a/include/chaiscript/utility/json_wrap.hpp +++ b/include/chaiscript/utility/json_wrap.hpp @@ -110,7 +110,7 @@ namespace chaiscript { return json::JSON(bn.get_as()); } else { - return json::JSON(bn.get_as()); + return json::JSON(bn.get_as()); } } catch (const chaiscript::detail::exception::bad_any_cast &) { // not a number From e23c2bb04f07b4949fd334932b69fd9e4250eb7b Mon Sep 17 00:00:00 2001 From: arcoRocks <33952704+arcoRocks@users.noreply.github.com> Date: Tue, 20 Feb 2018 16:23:45 +0100 Subject: [PATCH 2/3] fix for #413 --- include/chaiscript/utility/json_wrap.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/chaiscript/utility/json_wrap.hpp b/include/chaiscript/utility/json_wrap.hpp index 980b54be..656bf21d 100644 --- a/include/chaiscript/utility/json_wrap.hpp +++ b/include/chaiscript/utility/json_wrap.hpp @@ -110,7 +110,7 @@ namespace chaiscript { return json::JSON(bn.get_as()); } else { - return json::JSON(bn.get_as()); + return json::JSON(bn.get_as()); } } catch (const chaiscript::detail::exception::bad_any_cast &) { // not a number From 33451163c45a12f6046f323eb6416d7e624ec35c Mon Sep 17 00:00:00 2001 From: arcoRocks <33952704+arcoRocks@users.noreply.github.com> Date: Tue, 20 Feb 2018 16:28:23 +0100 Subject: [PATCH 3/3] to_json std::int64_t integer conversion --- unittests/json_3.chai | 1 + 1 file changed, 1 insertion(+) diff --git a/unittests/json_3.chai b/unittests/json_3.chai index 11ce7dcb..1308c492 100644 --- a/unittests/json_3.chai +++ b/unittests/json_3.chai @@ -1,2 +1,3 @@ assert_equal(from_json("100"), 100) assert_equal(from_json("-100"), -100) +assert_equal(to_json(4294967295), "4294967295")