Skip to content

Allow empty-string keys in JSON and YAML input#2068

Merged
johnkerl merged 1 commit into
mainfrom
johnkerl/json-empty-key
May 28, 2026
Merged

Allow empty-string keys in JSON and YAML input#2068
johnkerl merged 1 commit into
mainfrom
johnkerl/json-empty-key

Conversation

@johnkerl
Copy link
Copy Markdown
Owner

@johnkerl johnkerl commented May 28, 2026

Before

$ echo '{"":""}' | mlr-6.18.1 --j2y cat
[]
mlr JSON reader: object keys must be string-valued
$ echo '- "": ""' | mlr-6.18.1 --y2j cat
[
{}
]

After

$ echo '{"":""}' | mlr --j2y cat
- "": ""
$ echo '- "": ""' | mlr --y2j cat
[
{
  "": ""
}
]

@johnkerl johnkerl merged commit 0c9ef9a into main May 28, 2026
7 checks passed
@johnkerl johnkerl deleted the johnkerl/json-empty-key branch May 28, 2026 00:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant