Skip to content

Consider implementing Serialize/Deserialize for type Locale #6824

@sffc

Description

@sffc

We currently have an impl for LanguageIdentifier but not Locale. This discourages people from using Locale: #6810

In my opinion, we should implement serde on both or neither. Since we've had it on LanguageIdentifier since #89, we should probably just add it to Locale.

Please note that this is not just slapping #[derive(Serialize)]; the impl should look similar to the LanguageIdentifier impl, which does the same string serialize/parse that we currently recommend be done in userland.

CC @Manishearth @zbraniecki @xuxiaocheng0201

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-localeComponent: Locale identifiers, BCP47discussDiscuss at a future ICU4X-SC meeting

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions