mirror of
https://github.com/fankes/moshi.git
synced 2025-10-19 07:59:21 +08:00
Update changelog for 1.5
This commit is contained in:
38
CHANGELOG.md
38
CHANGELOG.md
@@ -1,6 +1,43 @@
|
|||||||
Change Log
|
Change Log
|
||||||
==========
|
==========
|
||||||
|
|
||||||
|
## Version 1.5.0
|
||||||
|
|
||||||
|
_2017-05-14_
|
||||||
|
|
||||||
|
* **Moshi now uses `@Nullable` to annotate all possibly-null values.** We've added a compile-time
|
||||||
|
dependency on the JSR 305 annotations. This is a [provided][maven_provided] dependency and does
|
||||||
|
not need to be included in your build configuration, `.jar` file, or `.apk`. We use
|
||||||
|
`@ParametersAreNonnullByDefault` and all parameters and return types are never null unless
|
||||||
|
explicitly annotated `@Nullable`.
|
||||||
|
|
||||||
|
* **Warning: Moshi APIs in this update are source-incompatible for Kotlin callers.** Nullability
|
||||||
|
was previously ambiguous and lenient but now the compiler will enforce strict null checks.
|
||||||
|
|
||||||
|
* **Kotlin models are now supported via the `moshi-kotlin` extension.** `KotlinJsonAdapterFactory`
|
||||||
|
is the best way to use Kotlin with Moshi. It honors default values and is null-safe. Kotlin
|
||||||
|
users that don't use this factory should write custom adapters for their JSON types. Otherwise
|
||||||
|
Moshi cannot properly initialize delegated properties of the objects it decodes.
|
||||||
|
|
||||||
|
* New: Upgrade to Okio 1.13.0.
|
||||||
|
|
||||||
|
```xml
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.squareup.okio</groupId>
|
||||||
|
<artifactId>okio</artifactId>
|
||||||
|
<version>1.13.0</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
com.squareup.okio:okio:1.13.0
|
||||||
|
```
|
||||||
|
|
||||||
|
* New: You may now declare delegates in `@ToJson` and `@FromJson` methods. If one of the arguments
|
||||||
|
to the method is a `JsonAdapter` of the same type, that will be the next eligible adapter for
|
||||||
|
that type. This may be useful for composing adapters.
|
||||||
|
* New: `Types.equals(Type, Type)` makes it easier to compare types in `JsonAdapter.Factory`.
|
||||||
|
* Fix: Retain the sign on negative zero.
|
||||||
|
|
||||||
|
|
||||||
## Version 1.4.0
|
## Version 1.4.0
|
||||||
|
|
||||||
_2017-02-04_
|
_2017-02-04_
|
||||||
@@ -158,3 +195,4 @@ _2015-06-16_
|
|||||||
[rfc_7159]: https://tools.ietf.org/html/rfc7159
|
[rfc_7159]: https://tools.ietf.org/html/rfc7159
|
||||||
[gson]: https://github.com/google/gson
|
[gson]: https://github.com/google/gson
|
||||||
[jackson]: http://wiki.fasterxml.com/JacksonHome
|
[jackson]: http://wiki.fasterxml.com/JacksonHome
|
||||||
|
[maven_provided]: https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html
|
||||||
|
15
README.md
15
README.md
@@ -481,17 +481,28 @@ Download [the latest JAR][dl] or depend via Maven:
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.squareup.moshi</groupId>
|
<groupId>com.squareup.moshi</groupId>
|
||||||
<artifactId>moshi</artifactId>
|
<artifactId>moshi</artifactId>
|
||||||
<version>1.4.0</version>
|
<version>1.5.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
```
|
```
|
||||||
or Gradle:
|
or Gradle:
|
||||||
```groovy
|
```groovy
|
||||||
compile 'com.squareup.moshi:moshi:1.4.0'
|
compile 'com.squareup.moshi:moshi:1.5.0'
|
||||||
```
|
```
|
||||||
|
|
||||||
Snapshots of the development version are available in [Sonatype's `snapshots` repository][snap].
|
Snapshots of the development version are available in [Sonatype's `snapshots` repository][snap].
|
||||||
|
|
||||||
|
|
||||||
|
ProGuard
|
||||||
|
--------
|
||||||
|
|
||||||
|
If you are using ProGuard you might need to add the following options:
|
||||||
|
```
|
||||||
|
-dontwarn okio.**
|
||||||
|
-dontwarn javax.annotation.Nullable
|
||||||
|
-dontwarn javax.annotation.ParametersAreNonnullByDefault
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
License
|
License
|
||||||
--------
|
--------
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user