Commit Graph

1217 Commits

Author SHA1 Message Date
Jesse Wilson
77a1f388db Fix Javadoc builds with the jsr305 dependency. (#306)
Because multiple modules share a package we need to share the dependency on
everything in package-info.java.
2017-05-14 22:18:35 -04:00
jwilson
4050e45e82 Update changelog for 1.5 2017-05-14 22:02:51 -04:00
Jake Wharton
5031a313b7 Merge pull request #305 from square/jwilson.0514.okio113
Upgrade to Okio 1.13.
2017-05-14 19:00:58 -07:00
jwilson
c8d8ee1fff Upgrade to Okio 1.13. 2017-05-14 21:58:48 -04:00
Jake Wharton
7d0c952102 Merge pull request #304 from square/jwilson.0514.factory_class
Use a class for KotlinJsonAdapterFactory.
2017-05-14 20:06:33 -04:00
jwilson
7d5c4adc8d Use a class for KotlinJsonAdapterFactory. 2017-05-14 20:01:26 -04:00
Niklas Baudy
10c77d7979 Fix typo in Changelog. (#302) 2017-05-10 07:19:34 -04:00
Jake Wharton
de4c2e782e Merge pull request #300 from square/jwilson.0507.synthetic_properties
Support more kinds of properties in KotlinJsonAdapter
2017-05-07 17:31:21 -04:00
jwilson
494992dab8 Support more kinds of properties in KotlinJsonAdapter
This makes it possible to have synthetic properties that have no
state.

Also test properties that are synthetic and have no backing field.

Closes: https://github.com/square/moshi/issues/299
2017-05-07 16:18:12 -04:00
Eric Cochran
e59dbf4f96 Add @Nullable to result of Types.nextAnnotations. (#298) 2017-05-06 21:07:59 -04:00
Jesse Wilson
c65b3bf1cb Import jsr305 and use it to mark @Nullable stuff. (#297) 2017-05-06 20:31:24 -04:00
Jake Wharton
dac5f695b3 Merge pull request #296 from square/jwilson.0506.checkstyle_77
Enable Checkstyle 7.7.
2017-05-06 12:13:00 -07:00
jwilson
0ea1959b7e Enable Checkstyle 7.7. 2017-05-06 14:48:55 -04:00
Eric Cochran
13fd0b252c Throw NPE for null indent string in factory method. (#289)
Fail when creating the JsonAdapter rather than when using it.
2017-04-29 21:46:08 -04:00
Serj Lotutovici
f942e0fd52 Make Types.equals(Type, Type) public. (#292) 2017-04-29 21:45:06 -04:00
Jake Wharton
bcec358554 Merge pull request #286 from square/jwilson.0421.enums
KotlinJsonAdapter shouldn't convert enums.
2017-04-21 10:05:10 -05:00
jwilson
cd1542363d KotlinJsonAdapter shouldn't convert enums.
Closes: https://github.com/square/moshi/issues/284
2017-04-21 09:54:45 -05:00
Eric Cochran
d95dd07c56 Fix Types.equals for arrays. (#279) 2017-04-20 17:27:47 -05:00
Christian Brüggemann
e76110b4b1 Fix Factory visibility (#282)
* Fix Factory visibility

* Remove redundant constructor keyword
2017-04-20 17:26:57 -05:00
Eric Cochran
448a2d3298 Treat negative zero as a number, not a long. (#285)
Updates logic from https://github.com/google/gson/issues/1053
2017-04-20 17:22:06 -05:00
Jake Wharton
b4c43ae771 Merge pull request #283 from square/jwilson.0420.more_kotlin_stuff
Handle nulls symetrically in KotlinJsonAdapter.
2017-04-20 11:08:21 -05:00
jwilson
6112993919 Handle nulls symetrically in KotlinJsonAdapter.
When writing nulls we omit them, and when a value is omitted we assume
it is null.
2017-04-20 08:38:18 -05:00
Jesse Wilson
81bbe870f1 KotlinJsonAdapter (#281)
* Add kotlin-module with support for Kotlin data classes

* Naming and style changes to KotlinJsonAdapter.

Biggest changes:

 * Attempt to support regular classes and data classes
 * Avoid parameter hashing when indexing is sufficient for
   constructor parameters
2017-04-18 23:51:37 -04:00
Jesse Wilson
8c18caf574 Add a test to confirm types are canonicalized. (#278)
Obsoletes https://github.com/square/moshi/pull/129/files
2017-04-16 12:15:53 -04:00
Eric Cochran
11dbc3c50b Fix @ToJson IAE message. (#275) 2017-03-28 05:57:53 -04:00
Eric Cochran
718f832864 Allow easy delegates in adapter methods. (#272) 2017-03-27 21:48:19 -04:00
Eric Cochran
1b634bbb74 Update adapter methods ISE message. (#273) 2017-03-27 19:25:31 -04:00
Jake Wharton
05b0a46961 Add error-prone compiler. (#259)
* Fix error-prone warning

* Add error-prone compiler.

* Suppress warning about calling getClass() on annotation.
2017-02-14 22:28:24 -05:00
Jesse Wilson
b6ebe53ffb Merge pull request #257 from square/eric/readme-1.4.0
Fix README version number
2017-02-05 17:49:23 -05:00
Eric Cochran
1e37d8dc42 Fix README version number 2017-02-05 14:38:05 -08:00
Jesse Wilson
af09de142d Merge pull request #254 from square/eric/readme
Remove package API from README
2017-02-04 19:40:01 -05:00
Eric Cochran
0a70c5c4ab Remove package API from README
Types.createJsonQualifierImplementation() is not a public API.
2017-02-04 15:39:35 -08:00
jwilson
49092ece96 [maven-release-plugin] prepare for next development iteration 2017-02-04 15:20:11 -05:00
jwilson
d075a3e56a [maven-release-plugin] prepare release moshi-parent-1.4.0 2017-02-04 15:20:05 -05:00
jwilson
c8c7bb8f9b Update changelog for 1.4.0. 2017-02-04 15:17:34 -05:00
Jesse Wilson
921d949a76 Merge pull request #252 from square/jwilson.0204.use_fromJsonObject
Use readJsonValue() in DefaultOnDataMismatchAdapter.
2017-02-04 15:13:04 -05:00
jwilson
559e3a22ea Use readJsonValue() in DefaultOnDataMismatchAdapter. 2017-02-04 14:22:24 -05:00
Jesse Wilson
aebd860d1c Merge pull request #250 from NightlyNexus/eric/readJsonValue
Add JsonReader.readJsonValue
2017-02-04 14:14:57 -05:00
jwilson
d03ec8e47f Merge branch 'eyedol-update-readme-with-jsonarray-example'
* eyedol-update-readme-with-jsonarray-example:
  Update doc with how to parse JSON Arrays
2017-02-04 14:13:12 -05:00
Henry Addo
a92509bff2 Update doc with how to parse JSON Arrays 2017-02-04 14:13:05 -05:00
Eric Cochran
332adcadf5 Add JsonReader.readJsonValue 2017-02-03 20:29:59 -08:00
Jake Wharton
7013651dd5 Merge pull request #249 from square/jwilson.0203.dont_mispel
Fix a typo in the name of JsonUtf8Writer.
2017-02-03 13:06:56 -05:00
Jesse Wilson
4d6a4c7383 Merge pull request #248 from square/jwilson.0202.recover_from_failure_example
Example adapter that recovers from JsonDataExceptions.
2017-02-03 13:02:54 -05:00
jwilson
5ea65a5f95 Fix a typo in the name of JsonUtf8Writer. 2017-02-03 13:02:18 -05:00
jwilson
af6ff5e6e3 Example adapter that recovers from JsonDataExceptions. 2017-02-02 23:24:08 -05:00
Jesse Wilson
81aed974c6 Merge pull request #247 from square/jwilson.0202.rename_teh_things
Rename toJsonObject() to toJsonValue(), fromJsonObject() to fromJsonV…
2017-02-02 22:06:15 -05:00
jwilson
e9d8538ec3 Rename toJsonObject() to toJsonValue(), fromJsonObject() to fromJsonValue().
Also rename the JsonReader and JsonWriter implementations.
2017-02-02 21:28:38 -05:00
Jesse Wilson
5b5a1a6b9b Merge pull request #236 from NightlyNexus/eric/factory-samples
Add Unwrap JsonAdapter.Factory sample
2017-02-02 09:12:06 -05:00
Jesse Wilson
3af58f4a43 Merge pull request #245 from NightlyNexus/eric/platform-fields
Fix isPlatformType
2017-02-02 09:10:45 -05:00
Jesse Wilson
cf087753ff Merge pull request #246 from square/jwilson.0202.numbers_ii
Use BigDecimal to encode exotic number types.
2017-02-02 08:27:47 -05:00