Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Formatted JSON output with ls -j #13

Merged
merged 1 commit into from
Jan 31, 2018

Conversation

killerwhile
Copy link

JSON formatted output with the following structure:

[
    { "name": "/my/hdfs/file/or/folder1", more attributes },
    { "name": "/my/hdfs/file/or/folder2", more attributes },
    ... more file or folders ...
]

Please note that unlike the normal ls command ls -j always uses absolute path and does ignore the -h file size formatting.

@Shastick
Copy link

If @a-pagano is happy with this output we can go with this. It's a bit hacky though, we can work on fixing this (ie, with different writers instead of if's peppered around) before doing a PR to the original go-hdfs

Copy link

@a-pagano a-pagano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me thanks!

@Shastick Shastick merged commit 2a23e4f into master Jan 31, 2018
@Shastick Shastick deleted the feature/json-formatted-output branch August 20, 2019 12:48
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.

None yet

3 participants