zerebubuth / openstreetmap-cgimap

A C++ implementation of the OpenStreetMap API map call.
http://wiki.openstreetmap.org/wiki/Cgimap
GNU General Public License v2.0
74 stars 38 forks source link

json writer: fmt for formatting integer values #390

Closed mmd-osm closed 7 months ago

mmd-osm commented 7 months ago

yajl_gen_integer calls sprintf for integer formatting. By using yajl_gen_number, we can provide formatted numbers ourselves, thereby taking advantage of faster formatting in fmt.

Code is pretty much the same as for entry(double), except that we're formatting integer numbers.