summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Hatch <jhatch@multitech.com>2016-01-27 15:20:20 -0600
committerJeff Hatch <jhatch@multitech.com>2016-01-27 15:20:20 -0600
commitb171f5cb629c3123ec1adc0300ad63d297a77c25 (patch)
treee79b9038b0156e30b0def72a9f55adc898b1882b
parent1a2ac0075274598fcbf02c3cc6aa05e67138080b (diff)
downloadjsparser-b171f5cb629c3123ec1adc0300ad63d297a77c25.tar.gz
jsparser-b171f5cb629c3123ec1adc0300ad63d297a77c25.tar.bz2
jsparser-b171f5cb629c3123ec1adc0300ad63d297a77c25.zip
[IN001647][IN001648] jsparser: integer values over a certain size get converted to scientific notation0.3
-rw-r--r--main.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/main.cpp b/main.cpp
index 41885c7..761b507 100644
--- a/main.cpp
+++ b/main.cpp
@@ -184,11 +184,6 @@ std::string get(const std::string& sPath, const Json::Value& jData) {
return "false";
}
}
- if (tmp->isDouble()) {
- std::stringstream ss;
- ss << tmp->asDouble();
- return ss.str();
- }
if (tmp->isInt()) {
std::stringstream ss;
ss << tmp->asInt();
@@ -199,6 +194,11 @@ std::string get(const std::string& sPath, const Json::Value& jData) {
ss << tmp->asUInt();
return ss.str();
}
+ if (tmp->isDouble()) {
+ std::stringstream ss;
+ ss << tmp->asDouble();
+ return ss.str();
+ }
if (g_iOptions & OPT_JSOBJ) {
//Returning Json Object