How to disable "new" pretty-print?

Description of the issue: Today I have found a new feature on Brave called “pretty-print” that formats JSON when loaded in the browser. I don’t like how it pretty prints and I would like it disable since I use an extension for that purpose that allows me greater customization.
The extension, by the way, is called JSON viewer

How can this issue be reproduced?

  1. Load an URL that retrieves a JSON
  2. See the pretty-print option
  3. It shadows the extension

Expected result: Being able to disable the pretty-print option

Brave Version( check About Brave): I’m running Brave version Version 1.58.124 Chromium: 117.0.5938.62 (Official Build) (arm64) on a Mac running Ventura 13.4

Additional Information: Back on Sept 15th I didn’t have that option. Looking at Brave release history I can see that the version I’m running was push on Sept 14th, so I guess after that update I got that functionality.

2 Likes

Also looking for a solution to this, the available extensions are far better than this.

It looks like there is flag available in Edge that that allows this to be disabled.
Is it possible to add this flag also to Brave?

1 Like

Aaaargh; yes, please a way to disable - this is obnoxious behavior to roll out at random and (as noted) worse than the simple extension i used for this very thing. It’d be one thing if it at least used the viewer that the dev tools use where it highlights syntax appropriately but, just straight text? Nah, this is 2023 y’all.

1 Like

It looks like this could be the Chromium change that caused it:
https://chromium.googlesource.com/chromium/src/+/3de2ed86697f07ca79509f84338f3b75e3871916

Possible that PrettyPrintJSONDocument is the runtime_enabled_feature that needs to be disabled (or configurable via brave://flags?)

1 Like

Here is a workaround for the moment.

You can disable the new chromium feature with the --disable-blink-features=PrettyPrintJSONDocument argument.

For MacOS you will need to quit brave, and relaunch Brave from the Command Line with
open -a "Brave Browser.app" --args --disable-blink-features=PrettyPrintJSONDocument

Instructions for custom flags on Windows are here:

1 Like

This works, thank you.

1 Like

This worked for me too.

Will I have to open Brave from the terminal every time in order to disable the PrettyPrintJSONDocument ?

Go to properties on the browser shortcut and add the flag to the end of target, this will add the add flag for you every time you open brave from the shortcut

I too want this gone, or at the very least be replaceable by any of the much better extensions that are available.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.