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

Issue 5719 - remove Pretty JSON and make it user configurable #5766

Merged
merged 9 commits into from Aug 21, 2023

Conversation

gtebrean
Copy link
Contributor

@gtebrean gtebrean commented Aug 17, 2023

PR description

Added --pretty-json-enabled as CLI option as it was asked in the issue mentioned bellow.

Here I attached an example with the output of a RPC request when Besu was ran with --pretty-json-enabled (first case) and without the argument in second case:
Screenshot 2023-08-17 at 16 44 00

Fixed Issue(s)

Fixes #5712

@github-actions
Copy link

github-actions bot commented Aug 17, 2023

  • I thought about documentation and added the doc-change-required label to this PR if updates are required.
  • I thought about the changelog and included a changelog update if required.
  • If my PR includes database changes (e.g. KeyValueSegmentIdentifier) I have thought about compatibility and performed forwards and backwards compatibility tests

gtebrean and others added 2 commits August 17, 2023 17:02
Signed-off-by: George Tebrean <george@web3labs.com>
Copy link
Contributor

@macfarla macfarla left a comment

Choose a reason for hiding this comment

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

does this CLI option cover both HTTP and websockets?

CHANGELOG.md Outdated Show resolved Hide resolved
Signed-off-by: George Tebrean <george@web3labs.com>
@gtebrean
Copy link
Contributor Author

does this CLI option cover both HTTP and websockets?

Yes because is setting the format in JsonRpcConfiguration which is used by both. But anyway the websockets it returns the response without pretty print, unless jq,as example, is not specified as option.

Signed-off-by: George Tebrean <george@web3labs.com>
Signed-off-by: George Tebrean <george@web3labs.com>
@gtebrean gtebrean requested a review from macfarla August 18, 2023 07:23
@macfarla macfarla added the doc-change-required Indicates an issue or PR that requires doc to be updated label Aug 20, 2023
CHANGELOG.md Outdated Show resolved Hide resolved
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
@macfarla
Copy link
Contributor

Docs change required - add a note to docs that all HTTP and Websockets responses will be compact JSON by default, and the --json-pretty-print-enabled can be used to pretty-print the output if desired.

@macfarla macfarla enabled auto-merge (squash) August 21, 2023 00:11
@macfarla macfarla merged commit 92a3c5b into hyperledger:main Aug 21, 2023
18 of 19 checks passed
garyschulte pushed a commit to garyschulte/besu that referenced this pull request Aug 28, 2023
…edger#5766)

* add --pretty-json-enabled

* update changelog

Signed-off-by: George Tebrean <george@web3labs.com>

* Update CLI option name in CHANGELOG.md

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>

---------

Signed-off-by: George Tebrean <george@web3labs.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
garyschulte pushed a commit to garyschulte/besu that referenced this pull request Aug 28, 2023
…edger#5766)

* add --pretty-json-enabled

* update changelog

Signed-off-by: George Tebrean <george@web3labs.com>

* Update CLI option name in CHANGELOG.md

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>

---------

Signed-off-by: George Tebrean <george@web3labs.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
garyschulte pushed a commit to garyschulte/besu that referenced this pull request Aug 28, 2023
…edger#5766)

* add --pretty-json-enabled

* update changelog

Signed-off-by: George Tebrean <george@web3labs.com>

* Update CLI option name in CHANGELOG.md

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>

---------

Signed-off-by: George Tebrean <george@web3labs.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: garyschulte <garyschulte@gmail.com>
@bgravenorst bgravenorst removed the doc-change-required Indicates an issue or PR that requires doc to be updated label Aug 31, 2023
@non-fungible-nelson non-fungible-nelson added doc-change-required Indicates an issue or PR that requires doc to be updated and removed doc-change-required Indicates an issue or PR that requires doc to be updated labels Sep 11, 2023
eum602 pushed a commit to lacchain/besu that referenced this pull request Nov 3, 2023
…edger#5766)

* add --pretty-json-enabled

* update changelog

Signed-off-by: George Tebrean <george@web3labs.com>

* Update CLI option name in CHANGELOG.md

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>

---------

Signed-off-by: George Tebrean <george@web3labs.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change default to remove Pretty JSON and make it user configurable
4 participants