Commit graph

573 commits

Author SHA1 Message Date
Jesse Wilson
0a6e836762
Support up to 255 levels of nesting. (#349)
Closes: https://github.com/square/moshi/issues/348
2018-01-07 12:17:00 -05:00
Jake Wharton
8cde0e5d72
Merge pull request #413 from Egorand/egorand/raw-string
Use raw string literals to improve test data readability
2017-12-15 12:53:35 -05:00
Egor Andreevici
07f5d708dd Use raw string literals to improve test data readability 2017-12-15 14:01:45 +02:00
Eric Cochran
f53a77d311
Fix doc reference to Token. (#403)
JsonReader.Token is less redundant than Gson's JsonReader.JsonToken.
2017-12-01 12:07:26 -08:00
Eric Cochran
a8b1550e7e
Make selectString consistent across JsonReaders. (#399)
Make JsonValueReader.selectString return -1 for non-strings instead of throwing.
2017-11-27 15:33:03 -08:00
Jake Wharton
20ffd22110
Merge pull request #398 from sullis/kotlin-1.1.60
kotlin 1.1.60
2017-11-24 16:39:28 -05:00
Sean Sullivan
b06f65d2e9 kotlin 1.1.60 2017-11-24 16:27:37 -05:00
Eric Cochran
f922371fa8 Let JsonValueReader.nextString read numbers. (#390)
* Let JsonValueReader.nextString read numbers.

This adds parity with JsonUtf8Reader and lets big number literals in JSON be read in as strings in Java.

* Remove trailing 0 in float literal.
2017-11-24 07:23:12 -05:00
Jesse Wilson
03323ae998
Merge pull request #392 from square/eric.primitives
Add error message for accidental primitive usage.
2017-11-21 19:06:13 -05:00
Eric Cochran
2b7e5a3453 Add error message for accidental primitive usage.
Also, add a test for the requirement.
2017-11-11 18:37:04 -08:00
Eric Cochran
b7a91e0557 Update to Error Prone 2.1.2. (#384) 2017-11-06 11:49:22 -08:00
Eric Cochran
fd5c5ee2df
Fix a typo in the changelog. (#386) 2017-11-05 13:57:59 -08:00
Jake Wharton
d6742be404
Merge pull request #383 from square/eric.20171104.checkreturnvalue
Add @CheckReturnValue to appropriate public APIs.
2017-11-05 08:51:57 -08:00
Jesse Wilson
5812c994b1
Merge pull request #385 from square/eric.20171105.transient_constructor_error
Clarify error message for transient parameters.
2017-11-05 11:16:54 -05:00
Eric Cochran
b583adac37 Clarify error message for transient parameters.
Otherwise, the error message is misleading: "No property for required constructor $parameter"
2017-11-05 01:06:54 -08:00
Eric Cochran
e643a04ee5 Add @CheckReturnValue to appropriate public APIs. 2017-11-04 21:13:07 -07:00
Jesse Wilson
4ac0d6f5ef
Merge pull request #375 from square/eric.kotlin_readme
Document adding the KotlinJsonAdapterFactory.
2017-10-29 09:11:09 -04:00
Eric Cochran
88ec00bcf4
Document adding the KotlinJsonAdapterFactory.
If you add a custom Kotlin JsonAdapter factory after the KotlinJsonAdapterFactory, you're going to have a bad time.
2017-10-29 05:38:48 +00:00
Jake Wharton
f06b43b2a4
Merge pull request #374 from square/eric.cleanup_33
Update to Kotlin 1.1.51.
2017-10-28 10:13:54 +01:00
Eric Cochran
e0ad48cd97 Update to Kotlin 1.1.51. 2017-10-28 10:07:05 +01:00
Jesse Wilson
8bf298ac14 Merge pull request #360 from square/eric.20171004.delegate-adapters
Allow delegates for intermediates in adapters.
2017-10-04 21:53:12 -04:00
Eric Cochran
4376a50f1f Clarify delegation with qualifiers test. (#359) 2017-10-04 16:49:23 -07:00
Eric Cochran
f847d47daa Remove Types.equal. (#358)
Nobody uses this helper method.
2017-10-04 15:54:17 -07:00
Eric Cochran
de336ef86e Allow delegates for intermediates in adapters. 2017-10-04 15:53:33 -07:00
Jake Wharton
224369155e Merge pull request #355 from square/eric.20170925.proguard
Update ProGuard config for CheckReturnValue.
2017-09-25 15:51:55 -04:00
Eric Cochran
165e3628be Update ProGuard config for CheckReturnValue. 2017-09-25 15:03:36 -04:00
Jake Wharton
22c3b02b3f Merge pull request #354 from square/eric.20170925.checkreturnvalue
Add CheckReturnValue for toJson's string result.
2017-09-25 14:45:48 -04:00
Eric Cochran
2db89355f1 Add CheckReturnValue for toJson's string result.
This helps Error Prone and the IDE find accidental usages of toJson(value) instead of toJson(writer, value).
2017-09-25 14:18:31 -04:00
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