Comments (7)
I thought this had been done already in 1f37cec (see "ad1d22e Fix #509 by checking Nan/Inf when writing a double") ?
from lua-rapidjson.
Yes it still result 2.696539702293474e308
:
LuaJIT 2.0.4 -- Copyright (C) 2005-2015 Mike Pall. http://luajit.org/
JIT: ON CMOV SSE2 SSE3 SSE4.1 fold cse dce fwd dse narrow loop abc sink fuse
> j = require('rapidjson')
> print(j.encode(0/0))
2.696539702293474e308
from lua-rapidjson.
Strange... BTW, I think it is needed to check the return bool
of Double
, and raise error in Lua.
from lua-rapidjson.
It does not return false
when encoding 0/0
in lua.
from lua-rapidjson.
Yes. I have asked GitHub support that recently some PR was merged but the commit was lost in the history.
from lua-rapidjson.
I have got one e-mail but the admin don't think there is problem.
I manually cherry-pick the merge again and it should be in the master.
https://github.com/miloyip/rapidjson/blob/master/include/rapidjson/writer.h#L245
from lua-rapidjson.
Updated and tested in commit 7918f5b.
from lua-rapidjson.
Related Issues (20)
- Compile with TDM-GCC 32 on Windows
- rapidjson-0.5.2-1.rockspec not upload to https://luarocks.org HOT 1
- How to get full error list HOT 1
- why need cmake > =3.1? HOT 2
- cmake 2.8 build failed HOT 1
- question: how to compile `lua-rapidjson` with specified Lua/Luajit version. HOT 10
- question: how can I get the new value with default value. HOT 1
- validator occur coredump in centos 7 HOT 4
- Adding data to decoded empty table produce no change when encode again HOT 8
- build failed in RAM server HOT 1
- rapidjson.Document seems to not be freed correctly HOT 4
- decode 会给空的json对象添加元表 ‘json.object’, 导致table.insert(t), encode 产生错误的结果 HOT 1
- Macosx接入XLua的时候报了编译错误 HOT 3
- How to decode "null" as nil Default ! (not as rapidjson.null)
- lua-rapidjson dump 可以往别的路径写入文件么 HOT 1
- `nullref` might be changed unexpectedly while require rapidjson multi times in different lua states. HOT 3
- Compile XLua with lua-rapidjson integrated HOT 4
- Illegal instruction (core dumped) in aws ec2 HOT 2
- 不支持 ios、osx、osx_silicon 系统
- windows mingw64, can not link to lua51.dll
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lua-rapidjson.