Commit graph

345 commits

Author SHA1 Message Date
Jesse Wilson
8dfe9edc00 Merge pull request #352 from emmaguy/emmaguy/add-recipe-type-adapter-delegate
Add an example custom Adapter which delegates
2017-09-25 13:31:20 -04:00
Jesse Wilson
f5ceb91e0f Merge pull request #353 from square/eric.20170925.unwrap-write
Fix not writing value to JsonWriter in example.
2017-09-25 13:30:32 -04:00
Eric Cochran
eed3295495 Fix not writing value to JsonWriter in example. 2017-09-25 13:02:36 -04:00
Emma Guy
816f6f81c6 Add an example custom adapter which delegates 2017-09-24 13:40:01 +01:00
John Carlson
e8a2596841 Add ProGuard rule for JsonQualifier (#342) 2017-08-04 18:15:11 -04:00
Jake Wharton
da1ed8f5c3 Merge pull request #339 from oldergod/patch-1
Fix builder calls to new API
2017-07-31 23:59:33 -04:00
Benoît Quenaudon
5125fc2f27 Fix builder calls to new API
Update the example with the right API https://github.com/square/moshi/blob/master/moshi/src/main/java/com/squareup/moshi/Moshi.java#L155
2017-08-01 12:58:20 +09:00
Jesse Wilson
b4ad3b9789 Merge pull request #336 from Jawnnypoo/patch-1
Add moshi-kotlin documentation
2017-07-31 21:56:17 -04:00
Jesse Wilson
f12031ecba Merge pull request #337 from Jawnnypoo/patch-2
Document `moshi-adapters` artifact
2017-07-27 00:04:05 -04:00
John Carlson
76df51bfde Correction to docs of Rfc3339DateJsonAdapter 2017-07-26 14:49:46 -05:00
John Carlson
54c026f5db Document moshi-adapters artifact 2017-07-26 14:35:38 -05:00
John Carlson
ab5b3a468e Add moshi-kotlin documentation 2017-07-26 12:42:02 -05:00
Jake Wharton
c755894af3 Merge pull request #335 from square/eric.0724.null_kotlin
JsonAdapter.Factory.create rejects the null Type.
2017-07-24 20:57:34 +01:00
Eric Cochran
1340ef8935 JsonAdapter.Factory.create rejects the null Type.
This fails already in Types.getRawType, but a compiler error is preferable.
2017-07-24 11:06:22 -07:00
Jesse Wilson
fdd38cddd8 Merge pull request #333 from square/eric.0719.nonnull_annotations
Fail earlier with null annotation set.
2017-07-19 15:07:41 -04:00
Eric Cochran
00694e9878 Fail earlier with null annotation set. 2017-07-19 11:29:06 -07:00
Jesse Wilson
76f50df2cc Merge pull request #327 from square/eric.0620.date-cause
Add cause to malformed date string exception.
2017-06-20 18:14:17 -04:00
Eric Cochran
b7f771a70f Add cause to malformed date string exception. 2017-06-20 00:15:11 -07:00
Jesse Wilson
3c225fcad7 Merge pull request #321 from OleksandrKucherenko/patch-1
proguard config updates
2017-06-18 13:40:14 -04:00
Jake Wharton
f89544fd70 Merge pull request #324 from square/jwilson.0610.test_for_323
Add a test to demonstrate the 32-parameter limit
2017-06-10 21:28:35 -04:00
jwilson
d3926a7f86 Add a test to demonstrate the 32-parameter limit 2017-06-10 21:07:01 -04:00
Oleksandr
bcb150eb06 proguard config updates
updated proguard configuration for custom Json Adapters @FromJson/@ToJson cases
2017-06-09 14:18:38 +02:00
Jesse Wilson
aee3216ca1 Merge pull request #316 from square/jwilson.0526.delegate_core_adapter
Change the adapter for Object.class to delegate.
2017-05-27 06:09:42 -04:00
jwilson
9e9655b556 Change the adapter for Object.class to delegate.
Previously if we ever had an opaque Object, the content of this object
would always only use the built-in adapters for its members.

This changes the built-in Object adapter to do one layer of type checking
and then to delegate to user-supplied adapters.

The big upside of this is that application code can now change the default
numeric type to use when decoding an untyped object. Typically this will
be used to replace our default of Double with a user-specified numeric type
like BigDecimal.
2017-05-26 23:44:46 -04:00
Jake Wharton
cda6bb9f14 Merge pull request #312 from oldergod/patch-1
FIX TYPO: Voila -> Voilà
2017-05-21 22:07:11 -04:00
Benoît Quenaudon
c4436cef80 FIX TYPO: Voila -> Voilà 2017-05-22 11:01:32 +09:00
jwilson
798f14bda5 [maven-release-plugin] prepare for next development iteration 2017-05-14 22:20:00 -04:00
jwilson
f42ae45f4c [maven-release-plugin] prepare release moshi-parent-1.5.0 2017-05-14 22:19:55 -04:00
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