Commit Graph

1432 Commits

Author SHA1 Message Date
hmble
b046ea28ee
Typo in JavaDoc example 2018-10-10 20:28:10 +05:30
Jake Wharton
3f4ac29f91 Clean up the README a bit (#1376)
* Remove a lot of "Gson" as it's implied nearly everywhere.
* Remove broken Javadoc badge. Move other badges to be near the content to which they apply
* Not an official Google product
* Make download section more general. People other than Android developers use Gradle, for example.
2018-08-23 08:55:31 -07:00
Jake Wharton
ca9ae4c288
Merge pull request #1373 from knjk04/ImplementationDependency
Change 'compile' to 'implementation'
2018-08-21 17:39:51 -04:00
Karan Kumar
86ade21078 Change 'compile' to 'implementation' 2018-08-21 21:12:12 +01:00
Eric Cochran
92b6173791 Deprecate JsonElement.getAsCharacter 2018-07-30 13:44:21 -04:00
Eric Cochran
d8d8ccb98a Simplify maintainType logic
When we maintain the label value, we do not need to make a new JsonObject and copy over the keys and values when writing. The ordering will change, though. Before this change, it always put the label first.
2018-07-30 13:43:52 -04:00
lucalas
c1e7e2d280 Add possibility to maintain type variable in created pojo (#1342)
Instead of completely remove type variable, give the possibility to decide if maintain type value (if pojo has type variable declaration) or not.
2018-07-20 14:34:45 -07:00
Alexey Alexandrovich
67ff7d5198 add .gitattributes (#1350)
Use the linguist-documentation attribute to mark paths as documentation.
2018-07-20 14:18:18 -07:00
Christian Schwarz
9d44cbc19a Updated dependency examples to version 2.8.5 (#1330) 2018-06-06 18:14:47 -07:00
inder123
35c0ea7468
Changelog for Gson 2.8.5 2018-05-21 20:20:00 -07:00
inder123
5184e717ce
Updated User Guide for 2.8.5 2018-05-21 20:14:49 -07:00
Inderjeet Singh
986d3fb2fa [maven-release-plugin] prepare for next development iteration 2018-05-21 20:08:20 -07:00
Inderjeet Singh
f649e05141 [maven-release-plugin] prepare release gson-parent-2.8.5 2018-05-21 20:08:09 -07:00
joel-leitch
4c685b21a8 Private constructor (#1324)
* Adding private constructors on Util classes

* Remove obsolete step
2018-05-21 20:04:22 -07:00
inder123
d84e26d80c
Issue 1242: Printing Gson version when throwing AssertionError and IllegalArgumentException (#1321)
On some versions of Android (probably on some variants of the popular Samsung S4 phone), an older version of Gson is suspected to be bundled in, and gets picked up from the system classpath.
For those versions, the applications that include the latest Gson fail unexpectedly. This debug print will help confirm this issue.
2018-05-17 09:41:21 -07:00
Jake Wharton
1215841e46
Merge pull request #1281 from greatjack1/master
updated README to use implementation instead of compile
2018-05-16 09:39:32 -04:00
inder123
3547420885
Merge branch 'master' into master 2018-05-09 13:11:43 -07:00
inder123
a6890bbaba
Fixed https://github.com/google/gson/issues/1310 (#1311)
* Fixed https://github.com/google/gson/issues/1310

Also renamed VersionUtils to more readable abstraction JavaVersion
Added support for debian naming convention
Using min supported version (6) as the default if JDK version can't be figured out

* Moved JavaVersion to an internal package
2018-05-09 13:10:08 -07:00
inder123
57085d6212
2.8.4 README 2018-05-01 11:23:48 -07:00
inder123
f2dd56d98c
2.8.4 changelog 2018-05-01 11:21:47 -07:00
inder123
f77615ecff
2.8.4 2018-05-01 11:17:35 -07:00
inder123
d8857cd615
updated release process to the current steps 2018-05-01 11:15:12 -07:00
Inderjeet Singh
446a3bff8d [maven-release-plugin] prepare for next development iteration 2018-05-01 11:06:37 -07:00
Inderjeet Singh
9fbebdf990 [maven-release-plugin] prepare release gson-parent-2.8.4 2018-05-01 11:06:25 -07:00
inder123
049bf84e68
Using sun.misc.Unsafe only through reflection to avoid binary dependency (#1306)
If sun.misc.Unsafe not found on Java 9, try field.setAccessible
Also removed exception traces when sun.misc.Unsafe or override are not found
2018-05-01 09:57:45 -07:00
inder123
941363f14c
Added gradle/Idea support (#1302) 2018-04-30 09:54:24 -07:00
inder123
1b28ff3cda
Added a test for deserialization of fields using lowercase-dot naming policy (#1303) 2018-04-27 18:54:48 -07:00
Leon
ab35f11077 add FieldNamingPolicy.LOWER_CASE_WITH_DOTS (#1278) 2018-04-27 18:50:08 -07:00
JoonHo Park
be23a3aeeb Format ReleaseProcess.md using GFM (#1284)
Changes
- Space in `h1` header
- Indent code block & nested bullets properly with 3 spaces
- Unify numbered list indicator to `1.`
2018-04-27 18:42:53 -07:00
inder123
bf4789bb1f
2.8.3 in readme 2018-04-27 17:26:50 -07:00
inder123
91cb49e7ce
Version 2.8.3 changelog 2018-04-27 15:47:42 -07:00
inder123
3bc566b226
version 2.8.3 2018-04-27 15:42:25 -07:00
Inderjeet Singh
7dd379ffe1 [maven-release-plugin] prepare for next development iteration 2018-04-27 15:34:26 -07:00
Inderjeet Singh
4ed639e882 [maven-release-plugin] prepare release gson-parent-2.8.3 2018-04-27 15:34:15 -07:00
inder123
7fb3960aff
Fixed excludes section in maven-compiler-plugin (#1301) 2018-04-27 15:30:35 -07:00
Jake Wharton
0cf6c4dd1f
Merge pull request #1300 from lyubomyr-shaydariv/no-exec
Removed the executable flag from clearly text files
2018-04-26 08:34:31 -04:00
Lyubomyr Shaydariv
bdea5b9e99 Removed the executable flag from clearly text files 2018-04-26 10:23:15 +03:00
greatjack1
bff1027df2 updated README to use implementation instead of compile 2018-04-03 15:19:04 -04:00
Inderjeet Singh
4081dbaa6d Added a test for serialization/deserialization of enum classes with
fields
2018-03-17 16:00:46 -07:00
Andrey Mogilev
8445689e4d Java 9 support: use Unsafe-based reflection in Java 9+ (#1218)
* Java 9 support: use Unsafe-based reflection in Java 9+

fixes "illegal reflective access" warnings and exceptions

* fix Codacy warnings

* improve code quality based on PR review

* improve code quality based on PR review

* fix Codacy warning

* improve code quality based on PR review

* inlined createReflectionAccessor method
2018-01-04 00:38:50 +05:30
inder123
fb7ab06f07
Update README.md 2017-12-29 11:35:11 -08:00
Andrey Mogilev
0aaf5ff408 fix Java9 DateFormat changes (#1211)
* fix Java9 DateFormat changes

* fix Codacy warnings
2017-12-30 00:44:43 +05:30
Ori Schwartz
c744ccd51c avoid repeated calls to build() during deserialization by obtaining field types from the Message's defaultInstance (#1215) 2017-12-28 08:44:16 +05:30
Anirudh Ramanan
3bf1967c0a Optimised the create() call for Excluder TypeAdapterFactory (#1199)
* optimized the create() method, excludeClass used to get called two times, changed it to one

* fixed the create() method, and added support to disableAnonymousAndLocalClassSerialization

* peek only once

* enable anonymous and local class serialization

* bugfix

* removed the method, will raise it as a separate PR
2017-12-28 06:03:45 +05:30
michaelsavich
7ddac52748 Java 9 module (#1179)
* Add module-info.java

* Exclude module-info.java by default
2017-12-26 21:58:19 +05:30
Lucas
6b20e3aaec Including Maven snippet on README.md (#1205)
* Update README.md

Adding maven dependency to readme file. 
Fixes issue #1204

* incorporated feedback
2017-12-12 18:13:53 -08:00
Ori Schwartz
6e2fcdcaf2 Use Message instead of GeneratedMessage which is specific to protobuf v2. Message is a common superclass of both GeneratedMessage and GeneratedMessageV3. Also throw an exception to notify caller that DynamicMessage is not supprorted. (#1191) 2017-11-27 18:13:39 -08:00
Trung Do
855f0493d0 Fix a small typo (#1183) 2017-10-31 11:43:24 -07:00
inder123
6c05cedecb
Replaced oracle JDK 7 with openJDK 7 to fix broken build. (#1184) 2017-10-31 11:42:49 -07:00
Elliotte Rusty Harold
28344d861d Clarify handling of non-object omitted fields (#1169)
While deserializing, a missing entry in JSON results in setting the corresponding field in the object to its default value: null for object types, zero for numeric types, and false for booleans.
2017-10-28 16:41:25 -07:00