Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #20053 decimal separator in csv files
Actually it had nothing to do with CSV being the source, but it was the json exporter passing the values through all field formatters except for the fallback. This resulted in all fields using a 'Range' formatter (which is the default for all numeric types) passing through the formatter and being returned as strings in the json. Worse, if the locale was not a "dot" locale and decimal separator was on, the resulting string could not be easily converted into its original numeric type. Now, instead of checking for the fallback formatter only, there is a white list of formatters that can be applied when we want a json. This is a temporary solution because the "right" way to do it would be either a flag in the formatter to tell if it can be applied when converting to json and/or other "data" formats (csv etc.) or a different new method similar to representValue.
- Loading branch information
Showing
2 changed files
with
59 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters