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
The sdp::grammar::number_converter currently uses sufficient precision to guarantee roundtrip of all double values (by virtue of using the web::json::value::serialize() function, with the particular effect that a number like 59.94 is serialized as 59.939999999999998. Good for test cases, but probably not much else. See microsoft/cpprestsdk#706.
A custom attribute converter can be used to work around this issue, though the workaround ends up a little more verbose than one would like.
Some way of globally (within one make_session_description call) specifying precision or the number format in general was previously considered and rejected.
Another option may be to follow the resolution taken for nlohmann/json#360 and adopt the Grisu2 algorithm from Florian Loitsch. Since nmos-cpp already has nlohmann/json as a dependency, its implementation could be used.
The text was updated successfully, but these errors were encountered:
The
sdp::grammar::number_converter
currently uses sufficient precision to guarantee roundtrip of all double values (by virtue of using theweb::json::value::serialize()
function, with the particular effect that a number like 59.94 is serialized as59.939999999999998
. Good for test cases, but probably not much else. See microsoft/cpprestsdk#706.A custom attribute converter can be used to work around this issue, though the workaround ends up a little more verbose than one would like.
Some way of globally (within one
make_session_description
call) specifying precision or the number format in general was previously considered and rejected.Another option may be to follow the resolution taken for nlohmann/json#360 and adopt the Grisu2 algorithm from Florian Loitsch. Since nmos-cpp already has nlohmann/json as a dependency, its implementation could be used.
The text was updated successfully, but these errors were encountered: