mirror of
https://github.com/ChaiScript/ChaiScript.git
synced 2025-12-06 16:57:04 +08:00
commit
9c5514f1b6
@ -110,7 +110,7 @@ namespace chaiscript
|
|||||||
{
|
{
|
||||||
return json::JSON(bn.get_as<double>());
|
return json::JSON(bn.get_as<double>());
|
||||||
} else {
|
} else {
|
||||||
return json::JSON(bn.get_as<long>());
|
return json::JSON(bn.get_as<std::int64_t>());
|
||||||
}
|
}
|
||||||
} catch (const chaiscript::detail::exception::bad_any_cast &) {
|
} catch (const chaiscript::detail::exception::bad_any_cast &) {
|
||||||
// not a number
|
// not a number
|
||||||
|
|||||||
@ -1,2 +1,3 @@
|
|||||||
assert_equal(from_json("100"), 100)
|
assert_equal(from_json("100"), 100)
|
||||||
assert_equal(from_json("-100"), -100)
|
assert_equal(from_json("-100"), -100)
|
||||||
|
assert_equal(to_json(4294967295), "4294967295")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user