Feature request: copy JSON at path in Network Panel

99 views
Skip to first unread message

dominic tobias

unread,
Sep 20, 2018, 8:49:13 AM9/20/18
to Chrome DevTools
Hi,

Often I find myself frustrated at this: I want to copy some JSON from a network response but the output is terrible. For example:

chrome-crap-paste.jpg










But what I get looks like this:

action
:
"CHANGE"
afterRebalanceView
:
{projectedHedge: 25.31}
assetClass
:
"FXFWD"
ccy1
:
"GBP"
ccy2
:
"CHF"
clientLongCcy
:
"CHF"
clientShortCcy
:
"GBP"

I then have to go and manually format this so I can compare it to other requests.

Would be really helpful if when you right click there is an option "Copy JSON at path" which gives you a nice formatted copy of the JSON at the path.

Thanks!

PhistucK

unread,
Sep 20, 2018, 8:52:53 AM9/20/18
to Google Chrome Developer Tools
I found myself with the need to copy JSON from the response panel a lot of times, too.
What I usually do as a workaround (without manually formatting) is right clicking on it and selecting "Store as global variable".
This will add temp1 (or temp2 and so on) as a global variable. Then, I enter (copy(temp1)) in the console. That is it, I copied a well-formed (and nicely spaced!) JSON string.

PhistucK


--
You received this message because you are subscribed to the Google Groups "Chrome DevTools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-chrome-develo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-chrome-developer-tools/412f9c0c-82af-46cb-9ee1-90b8c864dfbb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

dominic tobias

unread,
Sep 20, 2018, 9:52:44 AM9/20/18
to google-chrome-...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages