Skip to content
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

Handle enums that have true/false values as booleans #275

Merged
merged 2 commits into from
May 3, 2022
Merged

Conversation

swallez
Copy link
Member

@swallez swallez commented May 3, 2022

Add a specific JSON (de)serialization for enums that have true and false values. These used to be boolean properties that evolved into enums to handle more than two states.

Elasticsearch accepts their JSON boolean representation in requests and some tools/products expect them to be serialized as JSON booleans.

Fixes #139

@swallez swallez merged commit 2f0b5f6 into main May 3, 2022
@swallez swallez deleted the boolean-enums branch May 3, 2022 17:48
swallez added a commit that referenced this pull request May 3, 2022
Co-authored-by: Sylvain Wallez <sylvain@elastic.co>
swallez added a commit that referenced this pull request May 3, 2022
Co-authored-by: Sylvain Wallez <sylvain@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Serialize DynamicMapping values as booleans instead of string
1 participant