jsom stringify fix

This commit is contained in:
MihailRis 2023-12-03 17:28:13 +03:00
parent ba83b27179
commit b62b7bf2bb

View File

@ -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) {