You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that develop branch made effort on the bug of NaN and INF problem. however after deserialization of a serialized json object containing nan, an exception is throwed. binary serialization works fine.
Activity
nlohmann commentedon Aug 11, 2017
RFC 7159 states:
The library dumps inf and NaN to
null. This is documented in https://nlohmann.github.io/json/classnlohmann_1_1basic__json_a88d6103cb3620410b35200ee8e313d97.html#a88d6103cb3620410b35200ee8e313d97.Therefore,
strjisso
j2["number"]isnulland cannot be converted todouble, hence the exceptionBinary serialization works, because CBOR and MessagePack do not have the limitations about inf and NaN.