Skip to content

Weird state of "newline-delimited JSON" support #18492

Description

@KFearsoff

Bug report form

  • I have done a basic search of the issue tracker to find any existing issues that are similar.
  • I have checked that my version is at least the latest stable release available via my installation method.

Describe the bug

nushell currently supports at least 3 variations of newline-delimited JSON inputs. First, there is from json --objects. There's also jsonl and ndjson support in stdlib.

How to reproduce

See from json having an --objects flag:

from json --help
...
  Parse a stream of line-delimited JSON values.
  > '{ "a": 1 }
{ "b": 2 }' | from json --objects
  ╭───┬────┬────╮
  │ # │ a  │ b  │
  ├───┼────┼────┤
  │ 0 │  1 │ ❎ │
  │ 1 │ ❎ │  2 │
  ╰───┴────┴────╯

See stdlib functions for newline-delimited JSON support:

nu -c "
  use std
  scope commands
  | where name =~ '^std formats from '
  | select name description extra_description
  | wrap 'Standard Library Commands'
  | table -e
"
╭───┬─────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ # │                                        Standard Library Commands                                        │
├───┼─────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ 0 │ ╭───────────────────┬─────────────────────────────────────────────────────────────────╮                 │
│   │ │ name              │ std formats from jsonl                                          │                 │
│   │ │ description       │ Convert from JSONL (https://jsonlines.org/) to structured data. │                 │
│   │ │ extra_description │                                                                 │                 │
│   │ ╰───────────────────┴─────────────────────────────────────────────────────────────────╯                 │
│ 1 │ ╭───────────────────┬─────────────────────────────────────────────────────────────────────────────────╮ │
│   │ │ name              │ std formats from ndjson                                                         │ │
│   │ │ description       │ Convert from NDJSON (https://github.com/ndjson/ndjson-spec) to structured data. │ │
│   │ │ extra_description │                                                                                 │ │
│   │ ╰───────────────────┴─────────────────────────────────────────────────────────────────────────────────╯ │
│ 2 │ ╭───────────────────┬─────────────────────────────────────────────────────────────────╮                 │
│   │ │ name              │ std formats from ndnuon                                         │                 │
│   │ │ description       │ Convert from NDNUON (newline-delimited NUON) to structured data │                 │
│   │ │ extra_description │                                                                 │                 │
│   │ ╰───────────────────┴─────────────────────────────────────────────────────────────────╯                 │
╰───┴─────────────────────────────────────────────────────────────────────────────────────────────────────────╯

Expected behavior

Given that all of those newline-delimited input formats are very similar, I'd expect a single interface to using them.

Configuration

key value
version 0.113.1
major 0
minor 113
patch 1
branch
commit_hash
build_os linux-x86_64
build_target x86_64-unknown-linux-gnu
rust_version rustc 1.95.0 (59807616e 2026-04-14) (built from a source tarball)
cargo_version cargo 1.95.0 (f2d3ce0bd 2026-03-21)
build_time 1980-01-01 00:00:00 +00:00
build_rust_channel release
allocator standard
features default, mcp, network, plugin, rustls-tls, sqlite, trash-support
installed_plugins
experimental_options example=false, reorder-cell-paths=true, pipefail=true, enforce-runtime-annotations=false, native-clip=false, cell-path-types=false

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:needs-triageAn issue that hasn't had any proper look

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions