Skip to content

Improve Locale handling in JsonFormat.Value #344

@cowtowncoder

Description

@cowtowncoder

(note: from FasterXML/jackson-databind#3316)

Currently handling of @JsonFormat.locale is sub-optimal: Locale is constructed in constructor of JsonFormat.Value, with:

new Locale(localeStr)

which works for simple language case like "de" (for German) or "en" (for English) but not for variants like "de_DE" / "de-DE" or "en_US".

Handling should be improved by using something like what databind method "_deserializeLocale()" in class JDKFromStringDeserializer does.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions