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

Feature Request: Pretty Print Output JSON #350

Closed
GCHQ77703 opened this issue Aug 27, 2018 · 5 comments
Closed

Feature Request: Pretty Print Output JSON #350

GCHQ77703 opened this issue Aug 27, 2018 · 5 comments

Comments

@GCHQ77703
Copy link
Member

At the moment, it appears it gets printed to the screen as JSON.stringify(output), it might look nicer if it were displayed as JSON.stringify(output, null, 2).

@PenguinGeorge
Copy link
Contributor

Which operation is this for? The JSON Beautify operation should pretty print.

@mattnotmitt
Copy link
Collaborator

mattnotmitt commented Aug 29, 2018 via email

@GCHQ77703
Copy link
Member Author

GCHQ77703 commented Aug 29, 2018

Yes, @artemisbot is right. I didn't realise there was an operation to do it, I feel like it might make sense to do it by default on an output of type json that is displayed.

You could also take it a step further and instead of printing a string, print a tree view:

screen shot 2018-08-29 at 12 20 13

Or:

screen shot 2018-08-29 at 12 21 23

However it would be necessary to have a raw / tree view toggle.

@n1474335
Copy link
Member

A tree view would be great. There is already an issue open for that: #203.

Indenting JSON outputs by default is actually a really quick fix. I'll do it now.

@n1474335
Copy link
Member

Done: https://gchq.github.io/CyberChef/#recipe=To_MessagePack()From_MessagePack()&input=eyJhIjogMSwgImIiOiAyfQ

We should improve the 'JSON Beautify' operation to at least have the option of providing a nice tree view though. Please continue the discussion in #203.

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

No branches or pull requests

4 participants