to json for formats> to json {flags} 
--raw, -r: remove all of the whitespace--indent, -i {number}: specify indentation width--tabs, -t {number}: specify indentation tab quantity| input | output | 
|---|---|
| any | string | 
Outputs a JSON string, with default indentation, representing the contents of this table
> [abc] |to json
[
"a",
"b",
"c"
]
Outputs a JSON string, with 4-space indentation, representing the contents of this table
> [JoeBobSam] |to json-i4
[
"Joe",
"Bob",
"Sam"
]
Outputs an unformatted JSON string representing the contents of this table
> [123] |to json-r
[1,2,3]
    Copyright © 2019–2023 The Nushell Project DevelopersLicensed under the MIT License.
    https://www.nushell.sh/commands/docs/to_json.html