mirror of
https://github.com/mapbox/tippecanoe.git
synced 2025-01-22 04:18:01 +00:00
Retain original form of numbers when stringifying
This commit is contained in:
parent
167beae307
commit
0e59a4f774
@ -661,11 +661,7 @@ static void json_print_one(struct string *val, json_object *o) {
|
||||
|
||||
string_append(val, '\"');
|
||||
} else if (o->type == JSON_NUMBER) {
|
||||
char *s;
|
||||
if (asprintf(&s, "%f", o->number) >= 0) {
|
||||
string_append_string(val, s);
|
||||
free(s);
|
||||
}
|
||||
string_append_string(val, o->string);
|
||||
} else if (o->type == JSON_NULL) {
|
||||
string_append_string(val, "null");
|
||||
} else if (o->type == JSON_TRUE) {
|
||||
|
Loading…
Reference in New Issue
Block a user