molsonkiko / JsonToolsNppPlugin

A Notepad++ plugin providing tools for JSON like linting, querying, a tree view, and CSV conversion.
Apache License 2.0
94 stars 10 forks source link

decimal values will be casted the wrong way #22

Closed targor closed 2 years ago

targor commented 2 years ago

When pretty print a json, then numers get casted the wrong way:

for example: {"cod":"200","message":0,"cnt":40,"list":[{"dt":1667574000,"main":{"temp":11.84,"feels_like":11.06,"temp_min":11.57,"temp_max":11.84,"pressure":1006,"sea_level":1006,"grnd_level":1005,"humidity":76,"temp_kf":0.27}}]}

"temp_max":11.84 will be converted to:

"temp_max": 1184.0,

molsonkiko commented 2 years ago

Hi @targor , thanks for bringing this up! I assume that's related to Issue #17 , where I forgot to specify English-US as the culture for parsing and stringifying of floating-point numbers.

Upgrading to version v4.2 should resolve this issue for you, but the issue was first fixed (AFAIK) in v4.

If the issue persists even after you upgrade, that's a real head-scratcher.

targor commented 2 years ago

Thank's for the clarification. I am using the pluginmanager of notepad++ and therefore mostly the newest versions are installed automatically. But currently only version 3 of your plugin is available in the pluginmanager on my pc. It seems that maybe there is something wrong with my install, or the plugin portal itself. I will install the plugin manually and then test again :).

targor commented 2 years ago

Updated manually to 4.2 now, and it works, all conversions seem to be correct. Sorry for the inconvenience.