We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
JSON with empty keys ({ "": "value" }) is rejected with an error:
{ "": "value" }
expecting an element; found empty element instead
Run this request:
POST https://api.codapi.org/v1/exec content-type: application/json origin: https://codapi.org { "sandbox": "python", "command": "run", "files": { "": "print('hello world')" } }
fails with:
error: Parsing JSON --> example-request.hurl:8:9 | 8 | "": "print('hello world')" | ^ expecting an element; found empty element instead |
Request executes correctly, as empty keys in JSON are allowed. This workaround works:
POST https://api.codapi.org/v1/exec content-type: application/json origin: https://codapi.org ``` { "sandbox": "python", "command": "run", "files": { "": "print('hello world')" } } ```
$ hurl request.hurl {"id":"python_run_f2057eb8","ok":true,"duration":273,"stdout":"hello world","stderr":""}
❯ hurl --version hurl 4.3.0 (aarch64-apple-darwin23.5.0) libcurl/8.7.1 OpenSSL/3.0.13 zlib/1.3.1 brotli/1.1.0 zstd/1.5.6 libidn2/2.3.7 libssh2/1.11.0 nghttp2/1.61.0 Features (libcurl): alt-svc AsynchDNS brotli HSTS HTTP2 IDN IPv6 Largefile libz NTLM SPNEGO SSL TLS-SRP UnixSockets zstd Features (built-in): brotli
The text was updated successfully, but these errors were encountered:
Thanks @badboy for reporting the bug. An empty key is indeed valid JSON. We will fix it for the next release.
Sorry, something went wrong.
fabricereix
Successfully merging a pull request may close this issue.
What is the current bug behavior?
JSON with empty keys (
{ "": "value" }
) is rejected with an error:Steps to reproduce
Run this request:
fails with:
What is the expected correct behavior?
Request executes correctly, as empty keys in JSON are allowed.
This workaround works:
Execution context
Possible fixes
The text was updated successfully, but these errors were encountered: