Jasonette / Jasonette/JASONETTE-iOS
Boolean types: unexpected behavior
- Dominant language
- JavaScript
- Stars
- 5.2k
- Forks
- 347
- PR merge metrics
- No merged PRs in 30d
Description
I can send `false` to a server in a JSON payload: `"key": "{{false}}"`
And that works great
But if I try to send `true`, it sends it as a _string_
If I send `"key": "{{var obj = true; return obj;}}"`, it also sends it as a _string_
But if I send: `"key": "{{if ($get.variable == true) {obj = true;}; return obj;}}"`, it sends `true`, not a _string_
If I send: `"{{var obj; if ($get.variable == true) {obj = true;} else {obj = true}; return obj;}}"`, it sends `true`, not a _string_
Ideally we should be able to send a boolean for `true` like we do for `false`, or both some other way that is consistent.
Contributor guide
Research direction
Start by reproducing the JSON payload examples in the issue and trace how template expressions are converted before the request is sent. Compare the serialization of true and false, then verify that both boolean values are transmitted consistently rather than as strings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api, mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100