Commit Graph

33 Commits

Author SHA1 Message Date
Maicol
2c94c757a6
Formats codebase (#2531)
* Formats `.java` files

* Formats `.md` files
2023-11-06 11:59:01 -08:00
Marcono1234
e93fda9f17
Fix typos and improve Gson Design Document formatting (#2491)
* Fix typos and grammar issues

Most of them were found by IntelliJ

* Improve formatting and fix typos in Gson Design Document
2023-09-20 15:44:15 -07:00
Marcono1234
88fd6d1390
Improve JsonAdapter documentation and tests (#2442)
* Document how `JsonAdapter` creates adapter instances & add tests

* Extend `JsonAdapter.nullSafe()` documentation

* Improve test for JsonAdapter factory returning null

Existing test `JsonAdapterNullSafeTest` had misleading comments; while it
did in the end detect if null had not been handled correctly, that only
worked because the field `JsonAdapterFactory.recursiveCall` is static and
one test method therefore affected the state of the other test method.
If the test methods were run separately in different test runs, they would
not have detected if null was handled correctly, because the factory would
not have returned null.

* Extend JsonAdapter nullSafe test

* Extend test
2023-08-23 07:09:32 -07:00
Maicol
742fd50ff7
Fix error prone warns (#2319)
* Adds a javadoc summary to the methods in the `SerializedName` annotation

Fixes the `MissingSummary` warn given by ErrorProne

* Adds a javadoc summary to the methods of the `ExclusionStrategy` annotation

 Fixes the `MissingSummary` warn given by ErrorProne

* Adds a javadoc summary to `getDeclaringClass()` and `getName()` methods of the `FieldAttributes` class

 Fixes the `MissingSummary` warn given by ErrorProne

* Adds a javadoc summary to `getMajorJavaVersion()` and `isJava9OrLater()` methods of the `JavaVersion` class

 Fixes the `MissingSummary` warn given by ErrorProne

* Adds a comment in the empty catch block of the `AccessChecker:101` class

 Fixes the `EmptyCatch` warn given by ErrorProne

* Adds a comment in the empty catch block of the `DefaultDateTypeAdapter:158` class

 Fixes the `EmptyCatch` warn given by ErrorProne

* Adds a comment in the empty catch blocks of the `UnsafeAllocator:(67|92|113)` class

 Fixes the `EmptyCatch` warn given by ErrorProne

* Adds a comment in the empty catch block of the `DateTypeAdapter:85` class

 Fixes the `EmptyCatch` warn given by ErrorProne

* Fixes javadoc param of the `deserialize(...)` method of the `JsonDeserializer` interface

 Fixes the `InvalidParam` warn given by ErrorProne

* Adds a charset `StandardCharsets.UTF_8` in the `resourceToString()` method of the `ParseBenchmark` class

Fixes the `DefaultCharset` warn given by ErrorProne

* Fixes a typo

* Implements review feedback

* Adds blank line before @ tag.
2023-02-17 09:58:16 -08:00
Éamonn McManus
0d22e5d205
Add copyright notices to files that were missing them. (#2307)
In each case the copyright year is the year in which the file was first added.
2023-01-31 14:05:12 -08:00
Marcono1234
e614e71ee4
Clarify in documentation that Gson might cache strategy results (#2215)
* Clarify in documentation that Gson might cache strategy results

* Improve wording; mention that adapter factory results are cached as well
2022-10-04 09:01:55 -07:00
Marcono1234
796193d032
Improve versioning support documentation and validate version (#2214) 2022-10-02 16:38:43 -07:00
Marcono1234
6ffcdf3029
Fix Javadoc warnings and errors (#2040) 2021-12-26 15:30:21 -08:00
Marcono1234
530cb74470
Fix javadoc doclint HTML warnings (#1653) 2020-02-17 14:46:15 -08:00
Lorenz Nickel
b75e1bbc79 Code cleanup (Removed spaces) (#1474)
* Removed double spaces in comments

* Unified comments

* Removed space

* Removed spaces in code
2019-03-03 11:18:06 -08:00
Kevin Most
5f73666404 Update JsonAdapter documentation (#976)
Include mention of JsonDeserializer and JsonSerializer.
2016-12-11 22:37:55 -08:00
Inderjeet Singh
688f918a35 Added @Documented to Gson annotations.
This is useful since it shows the JSON format for a class which the user of that class should typically know.
2016-09-15 18:24:21 -07:00
testcenter
193349f4aa made nullSafe wrapper of JsonAdapter optional 2016-06-28 09:18:03 +02:00
Roman Mazur
3b1671dde9 Fix javadoc of SerializedName
In #699 the approach was changed but docs were left for the first implementation.
2015-10-04 19:56:02 +03:00
Inderjeet Singh
109915d93a Implemented support for multiple values for SerializedName annotation. 2015-10-03 02:01:30 -07:00
Michael Evans
64d74db8ae Add METHOD target for use with AutoValue's abstract property methods 2015-08-14 14:08:56 -04:00
Jesse Wilson
6a3e83a741 Javadoc for TypeAdapterFactory in @JsonAdapter. 2014-08-05 15:00:15 +00:00
Jake Wharton
117d8ea68f Add TypeAdapterFactory support to @JsonAdapter. 2014-08-04 16:58:41 +00:00
Jesse Wilson
125e6d9d3d Change field annotations to take precedence over registered type adapters. 2014-08-02 18:22:43 +00:00
Inderjeet Singh
f9a302e22a incorporated code review feedback. Added a test to ensure JsonAdapter validation doesn't carry side-effects to other fields 2014-08-01 02:16:42 +00:00
Jesse Wilson
a411a766f7 Leitch --> Wilson ! 2014-05-23 05:43:39 +00:00
Inderjeet Singh
edf66083e6 renamed @Adapt to @JsonAdapter 2014-03-26 17:59:54 +00:00
Inderjeet Singh
7f6a096030 renamed JsonAdapter annotation to Adapt annotation. 2014-03-09 23:08:54 +00:00
Inderjeet Singh
0922af5be6 removed invalid imports 2014-03-09 08:23:05 +00:00
Inderjeet Singh
67af0dd8f8 Added javadoc comment in JsonAdapter explaining the usage for fields.
Added a (broken) test the ensure a field annotation for JsonAdapter supersedes a class annotation.
2014-03-09 08:21:06 +00:00
Inderjeet Singh
bf549f0589 Added support for JsonAdapter annotation on fields 2014-03-09 07:28:04 +00:00
Inderjeet Singh
67d512ee7d Created a JsonAdapter annotation that can be applied to classes to indicate their TypeAdapter. 2014-03-08 22:37:19 +00:00
Inderjeet Singh
ff74224815 Revised equals and hashcode of ObjectTypePair to ensure reference equality of object instead of value equality. Improved JavaDocs for various 1.4 API methods. 2009-10-05 18:17:52 +00:00
Inderjeet Singh
6d50bcea87 Added serialize and deserialize parameters to the Expose annotation that control whether a field gets exposed during serialization or deserialization. 2009-05-19 23:47:53 +00:00
Inderjeet Singh
149604f0be Made author tags consistent across the public api. 2009-04-01 17:03:31 +00:00
Joel Leitch
1c87bd5993 Some minor update to our JavaDoc 2008-12-28 06:51:11 +00:00
Joel Leitch
6f59bc3bfe Added "Until" type version. This new annotation allows you to remove members from the JSON output beginning at a certain version number.
This new annotation work in conjunction with the "@Since" annotation.
2008-12-01 00:10:04 +00:00
Inderjeet Singh
57d1f32de5 moved gson as a project under trunk 2008-09-01 03:13:32 +00:00