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

Conversion function string -> boolean #943

Open
jonathanlukas opened this issue Oct 10, 2024 · 0 comments
Open

Conversion function string -> boolean #943

jonathanlukas opened this issue Oct 10, 2024 · 0 comments

Comments

@jonathanlukas
Copy link
Contributor

Is your feature request related to a problem? Please describe.

When an API uses String representations of booleans "true" and "false", it would be nice to parse them to actual boolean values.

Describe the solution you'd like

A function like this:

boolean(from: string): boolean

It would return a boolean true or false on exact matching, otherwise null with a meaningful error message.

A possible extension could be:

boolean(from: string, defaultValue: boolean): boolean

that would never return null, but always the default value if there is no exact match.

Related issues

Slack thread: https://camunda.slack.com/archives/C01QYD808A3/p1728550831522619

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants