changed output to null and changed warning message

also changed from <cmath> to <math.h>
This commit is contained in:
Vhuynh25 2022-02-08 15:45:49 -08:00 committed by GitHub
parent 7672f3a0f9
commit 07a2422c63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,7 +16,7 @@
#include <boost/algorithm/string/predicate.hpp>
#include <boost/operators.hpp>
#include <vector>
#include <cmath>
#include <math.h>
#include "crow/settings.h"
#include "crow/returnable.h"
@ -1776,7 +1776,8 @@ namespace crow
{
if (isnan(v.num.d) || isinf(v.num.d))
{
CROW_LOG_WARNING << "Invalid JSON value detected (" << v.num.d << "), ignoring";
out += "null";
CROW_LOG_WARNING << "Invalid JSON value detected (" << v.num.d << "), value set to null";
break;
}
#ifdef _MSC_VER