New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Yaml to Json Conversion is using comma instead of period symbol on float values #1023
Comments
Yaml to Json Conversion is using comma instead of period symbol on float valuesCurrent behaviorWhen converting a yaml content with float props values, the json output value uses the wrong decimal separator How to reproduce it (as minimally and precisely as possible)Accessing DevToys, going on Converters and then JSON <> Yaml option, insert a value line floatvalue: 1.0 Expected behaviorExpected that the json output to follow the RFC 8259 WorkaroundNo response Affected platformsWindows Affected DevToys kindDevToys (app with GUI) Relevant Code and Potential CausesThe issue with the decimal separator in float values during YAML to JSON conversion may be related to the handling of float parsing in the private readonly JsonSerializerSettings _defaultJsonSerializerSettings = new()
{
FloatParseHandling = FloatParseHandling.Decimal
}; This setting is used in both To address this issue, the conversion logic in DisclaimerHey there, I'm Doug, I'm a SWE working on a ticket specification bot to help get folks understanding specific bugs faster We are trying to test out our product on various open source repos like this one. Here is what our bot churned out for this ticket. If you found it helpful or have feedback just reply to this comment, I'll be watching it. Otherwise, I just hope this is helpful. Our thing isn't ready to sell yet, but you can find more info on our website: www.AI-Maintainer.com In the meantime, I haven't been paid to write C# in a looooonnngg time and the bot still gets stuff wrong, but looking at the code this seems at least like a decent starting point. If you could give feedback good and bad I'd love you for it. I genuinely hope this is just useful though. As a side note, it seems like the default in Brazil, where you are from @LuscasLeo , uses a comma in the scenario you described. So this might be hard for the devs to reproduce until they switch their locale to Brazil or similar. Hence this bug not being caught previously. So you may need to adjust your locale settings locally, or the devs need to enforce consistent usage between conversions. |
Current behavior
When converting a yaml content with float props values, the json output value uses the wrong decimal separator
How to reproduce it (as minimally and precisely as possible)
Accessing DevToys, going on Converters and then JSON <> Yaml option, insert a value line
floatvalue: 1.0
Expected behavior
Expected that the json output to follow the RFC 8259
Screenshots
Workaround
No response
Affected platforms
Windows
Affected DevToys kind
DevToys (app with GUI)
DevToys Version
Versão 1.0.13.0 | X64 | RELEASE | 2706c6c | 2706c6c | OS Build 22631.3007
Relevant Assets/Logs
No response
The text was updated successfully, but these errors were encountered: