FasterXML / FasterXML/jackson-future-ideas

Boolean Coercion Mapping Feature

Open
#31 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
21
Forks
3
PR merge metrics
No merged PRs in 30d

Description

I'd love to have a separate mapping feature disable to coercion of numbers to booleans without disabling a bunch of other scalar features.

If someone supplies a numeric string like "800" that I'm mapping to an integer field, I'm happy for Jackson to coerce the value to 800.

On the other hand, if someone supplies `"isOrganization": 12`, I don't want that to turn into `true`, because I suspect that `12` wasn't intended as a boolean value, that there's some other kind of mapping problem going on.

To be honest, I'm even ok with the 0/1 boolean mapping, I just don't want other numbers coerced to boolean, because I'm wary of it masking problems.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.