`ipfs --encoding=json ls` not returning JSON
- Dominant language
- Go
- Stars
- 17.1k
- Forks
- 3.2k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 11
Description
#### Version information:
go-ipfs version: 0.4.23-6ce9a35
Repo version: 7
System version: amd64/darwin
Golang version: go1.13.7
#### Description:
The output of `ipfs --encoding=json ls` is expected to return JSON, as with other commands. Instead, the output is the same as without the `encoding` parameter.
Example:
```
$ ipfs ls /ipfs/QmQy8FTQCdJGtNHg92pc4B6F4cjnuSdrFx9gdRmkrE1rVF
QmWyDJmrr6cRwEpTF2VGhWDi4uytrDHT8S5BptVdkbhjpv 6060 README.md
```
```
$ ipfs --encoding=json ls /ipfs/QmQy8FTQCdJGtNHg92pc4B6F4cjnuSdrFx9gdRmkrE1rVF
QmWyDJmrr6cRwEpTF2VGhWDi4uytrDHT8S5BptVdkbhjpv 6060 README.md
```
Expected output similar to HTTP API call:
```
curl "http://localhost:5001/api/v0/ls?arg=/ipfs/QmQy8FTQCdJGtNHg92pc4B6F4cjnuSdrFx9gdRmkrE1rVF" | jq
{
"Objects": [
{
"Hash": "/ipfs/QmQy8FTQCdJGtNHg92pc4B6F4cjnuSdrFx9gdRmkrE1rVF",
"Links": [
{
"Name": "README.md",
"Hash": "QmWyDJmrr6cRwEpTF2VGhWDi4uytrDHT8S5BptVdkbhjpv",
"Size": 6060,
"Type": 2,
"Target": ""
}
]
}
]
}
```
Contributor guide
Assessment
This issue has not been assessed yet.