wgtmac commented on code in PR #3277:
URL: https://github.com/apache/avro/pull/3277#discussion_r1900361135
##########
lang/c++/impl/json/JsonIO.hh:
##########
@@ -405,19 +404,17 @@ public:
template<typename T>
void encodeNumber(T t) {
sep();
- std::ostringstream oss;
- oss << boost::lexical_cast<std::string>(t);
- const std::string s = oss.str();
+ const std::string s = std::to_string(t);
out_.writeBytes(reinterpret_cast<const uint8_t *>(s.data()), s.size());
sep2();
}
void encodeNumber(double t) {
sep();
std::ostringstream oss;
- if (boost::math::isfinite(t)) {
- oss << boost::lexical_cast<std::string>(t);
- } else if (boost::math::isnan(t)) {
+ if (std::isfinite(t)) {
+ oss << t;
Review Comment:
I did a quick check and it seems there isn't any test case like that.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]