-
Notifications
You must be signed in to change notification settings - Fork 7
feat: Add ability to pretty print json #402
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
base: dev
Are you sure you want to change the base?
Conversation
JohannesLoot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like you ❤️
Thank you :)
I approve!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds functionality to pretty print JSON in request and response bodies for improved readability in logs, while also restoring log obfuscation that was previously disabled. The implementation provides a configurable option (prettifyJson) to format JSON with indentation when logging HTTP traffic.
Key changes:
- Added
prettifyJsonconfiguration flag with corresponding UI controls - Implemented JSON prettification logic with fallback for both NewtonSoft.Json and alternative JSON libraries
- Re-enabled log obfuscation in HTTP request/response logging and export functionality
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| Runtime/Game/Resources/LootLockerConfig.cs | Added prettifyJson config field and obfuscateLogs field, updated initialization methods |
| Runtime/Game/LootLockerLogger.cs | Implemented obfuscation and prettification pipeline for logged JSON bodies |
| Runtime/Editor/ProjectSettings.cs | Added UI control for the JSON prettification toggle |
| Runtime/Editor/LogViewer/LootLockerLogViewerUI.cs | Updated log viewer to use obfuscation in exports and created JSON foldout UI component |
| Runtime/Client/LootLockerJson.cs | Added PrettifyJsonString method for both JSON serialization backends |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
7242e25 to
e7f67a2
Compare
Build ability to pretty print json request and response bodies
Also re-add obfuscation that I'd accidentally disabled in my HTTP Queue refactor >.<