stellar / laboratory

82 stars 95 forks source link

Pretty print JSON on RPC payloads #978

Open accordeiro opened 3 weeks ago

accordeiro commented 3 weeks ago

We already pretty print JSON on the JSON<>XDR functionality.

Screenshot 2024-08-22 at 1 36 55 PM

I'd like to have the same monospaced, collapsible, syntax-highlighted JSON on RPC payloads, such as on this screen:

Screenshot 2024-08-22 at 1 37 48 PM

This will enable easier parsing / browsing of the API call that will be submitted.

Shaptic commented 3 weeks ago

@accordeiro if you want, you guys can wait until we release the next minor version of RPC which will let you get the responses as JSON by default via an xdrFormat: "json" parameter! :+1:

janewang commented 2 weeks ago

@Shaptic I can't wait for the next version of the RPC with JSON! 🎉

This is the payload that's submitted to the RPC endpoint that we want to prettify. We should consistently prettify JSON in Lab

FYI cc @sdfcharles

janewang commented 2 weeks ago

Discussed with @quietbits that we will change to pretty print without the toggle