-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
I have checked the following:
- I have searched existing issues and found nothing related to my issue.
This bug is:
- making Bruno unusable for me
- slowing me down but I'm able to continue working
- annoying
- this feature was working in a previous version but is broken in the current release.
Bruno version
2.8.0
Operating System
Ubuntu 22.04.5 LTS
Describe the bug
Since version 2.8.0, Bruno no longer accepts multiline JSON arrays in .bru
files.
JSON that includes line breaks inside arrays (which was previously working) now causes parsing errors.
This issue occurs when running requests via the CLI using bru run
.
The same files worked fine in version 2.7.x
.
Examples
✅ This works:
["foo", "bar"]
✅ This also works:
[{"foo": "bar"}]
[{
"foo": "bar"
}]
❌ This fails:
[
"foo",
"bar"
]
❌ This also fails:
[
{
"foo": "bar"
}
]
Expected Behavior
Multiline JSON arrays (with valid syntax) should be parsed correctly, as they are valid JSON.
This was the case in previous versions and should remain supported for readability and maintainability.
Actual Behavior
Parsing error is thrown in Bruno for any multiline JSON array or object inside arrays.
Workaround
Minify the JSON manually to remove line breaks
["foo", "bar"]
.bru file to reproduce the bug
Screenshots/Live demo link
with @usebruno/cli@2.8.0