1
0
mirror of https://github.com/nushell/nushell.git synced 2025-06-10 03:56:49 +02:00
Justin Ma c0a1d18e3d
update , regenerate commands' docs and update make_docs script ()
* feat: update , regenerate commands' docs

* chore: update make_docs script
2022-02-21 11:26:00 -06:00

629 B

title, layout, version
title layout version
to json command 0.59.0

Converts table data into JSON text.

Signature

> to json --raw --indent

Parameters

  • --raw: remove all of the whitespace
  • --indent {number}: specify indentation width

Examples

Outputs a JSON string, with default indentation, representing the contents of this table

> [a b c] | to json

Outputs a JSON string, with 4-space indentation, representing the contents of this table

> [Joe Bob Sam] | to json -i 4

Outputs an unformatted JSON string representing the contents of this table

> [1 2 3] | to json -r