增强 JsonUtils#6145
Conversation
…N parsing methods
… utility functions
There was a problem hiding this comment.
Pull request overview
This PR refactors and expands JsonUtils to provide clearer nullability semantics and a broader set of convenience overloads for JSON serialization/deserialization across strings, readers, input streams, and files, while also allowing callers to supply custom Gson instances.
Changes:
- Added
@NotNullByDefault+@Nullable/@UnknownNullabilitytype-use annotations to better document nullability behavior. - Introduced multiple new
fromJson(...)/fromJsonFile(...)overloads (including variants accepting a caller-providedGson), and reorganized existing helpers. - Expanded inline documentation for
GSON/UGLY_GSONand parsing/writing helpers.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request refactors the JsonUtils utility class by introducing nullability annotations, comprehensive documentation, and new method overloads that support custom Gson instances. Feedback focuses on maintaining consistency in the listTypeOf return types and removing redundant explicit type arguments in generic method calls to improve readability and leverage compiler type inference.
No description provided.