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

"to json --raw" does not “remove all whitespace” as documented #11900

Closed
flying-sheep opened this issue Feb 19, 2024 · 0 comments · Fixed by #11948
Closed

"to json --raw" does not “remove all whitespace” as documented #11900

flying-sheep opened this issue Feb 19, 2024 · 0 comments · Fixed by #11948
Labels
file-format Parsing/Writing of file formats/protocols needs-triage An issue that hasn't had any proper look
Milestone

Comments

@flying-sheep
Copy link
Contributor

flying-sheep commented Feb 19, 2024

Describe the bug

to json --raw leaves some whitespace

How to reproduce

> {a:1} | to json -r
{"a": 1}

Expected behavior

to json --raw should serialize exactly the way http post does:

> {a:1} | to json -r
{"a":1}

Screenshots

No response

Configuration

key value
version 0.90.1
branch makepkg
commit_hash c2992d5
build_os linux-x86_64
build_target x86_64-unknown-linux-gnu
rust_version rustc 1.75.0 (82e1608df 2023-12-21) (Arch Linux rust 1:1.75.0-2)
cargo_version cargo 1.75.0
build_time 2024-02-09 11:43:38 +00:00
build_rust_channel release
allocator mimalloc
features dataframe, default, extra, sqlite, trash, which, zip
installed_plugins

Additional context

No response

@flying-sheep flying-sheep added the needs-triage An issue that hasn't had any proper look label Feb 19, 2024
@sholderbach sholderbach added the file-format Parsing/Writing of file formats/protocols label Feb 19, 2024
sholderbach pushed a commit that referenced this issue Mar 20, 2024
fixes #11900  

# Description
Use `serde_json` instead.

# User-Facing Changes
The problem described in the issue now no longer persists.

No whitespace in the output of `to json --raw`
Output of unicode escape changed to consistent `\uffff`

# Tests + Formatting
I corrected all Tests that were affected by this change.
@hustcer hustcer added this to the v0.92.0 milestone Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
file-format Parsing/Writing of file formats/protocols needs-triage An issue that hasn't had any proper look
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants