jorgen / json_struct

json_struct is a single header only C++ library for parsing JSON directly to C++ structs and vice versa
Other
422 stars 57 forks source link

Update #19

Closed Iohannes-long closed 2 years ago

jorgen commented 2 years ago

Hello! Thank you for your interest in JsonStruct. Did you create a mergerequest by accident? I checked out your fork. The reson why json_struct doesn't use strtod et al is that they are locale aware, while json always requires det desimal delimiter to be a dot. Therfore parsing json in locales where they use a comma "," will break json_struct if we use strtod and to_string. Also to_string doesn't provide the shortest possible output, while json_struct uses a ryu implementation for generating float and double strings. I'm closing the mergerequest since it just tries to reapply an old commit, but please do not hestiate to reopen if I misunderstood something.