How to set Locale on GSON (for decimal number separators)
问题 I know you can set date formatting, but how do you set other locale specific stuff like decimal number formatting? (I mean comma vs. dot) 回答1: Short answer: you don't. You seem to be somewhat confusing the textual representation of a number and an actual numeric value. While JSON is a text-based data interchange format, a number (vs. a string) in JSON is a numeric value and is not affected by locale. Section 2.4 of the JSON specification provides the specific definition (emphasis mine): 2.4.