jsom stringify fix
This commit is contained in:
parent
ba83b27179
commit
b62b7bf2bb
@ -39,6 +39,7 @@ void stringifyObj(JObject* obj,
|
|||||||
string indentstr,
|
string indentstr,
|
||||||
bool nice);
|
bool nice);
|
||||||
|
|
||||||
|
#include <iostream>
|
||||||
void stringify(Value* value,
|
void stringify(Value* value,
|
||||||
stringstream& ss,
|
stringstream& ss,
|
||||||
int indent,
|
int indent,
|
||||||
@ -71,7 +72,6 @@ void stringify(Value* value,
|
|||||||
} else if (value->type == valtype::boolean) {
|
} else if (value->type == valtype::boolean) {
|
||||||
ss << (value->value.boolean ? "true" : "false");
|
ss << (value->value.boolean ? "true" : "false");
|
||||||
} else if (value->type == valtype::number) {
|
} else if (value->type == valtype::number) {
|
||||||
ss << std::fixed;
|
|
||||||
ss << std::setprecision(15);
|
ss << std::setprecision(15);
|
||||||
ss << value->value.decimal;
|
ss << value->value.decimal;
|
||||||
} else if (value->type == valtype::integer) {
|
} else if (value->type == valtype::integer) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user