mirror of
https://github.com/fankes/moshi.git
synced 2025-10-19 16:09:21 +08:00
Update README for 1.6.0.
This commit is contained in:
10
README.md
10
README.md
@@ -505,7 +505,7 @@ The reflection adapter requires the following additional dependency:
|
|||||||
```
|
```
|
||||||
|
|
||||||
```groovy
|
```groovy
|
||||||
implementation 'com.squareup.moshi:moshi-kotlin:1.5.0'
|
implementation 'com.squareup.moshi:moshi-kotlin:1.6.0'
|
||||||
```
|
```
|
||||||
|
|
||||||
Note that the reflection adapter transitively depends on the `kotlin-reflect` library which is a
|
Note that the reflection adapter transitively depends on the `kotlin-reflect` library which is a
|
||||||
@@ -546,9 +546,9 @@ annotationProcessor 'com.squareup.moshi:moshi-kotlin-codegen:1.6.0'
|
|||||||
|
|
||||||
#### Limitations
|
#### Limitations
|
||||||
|
|
||||||
Neither reflection nor codegen supports Kotlin types that have a Java superclass other than
|
If your Kotlin class has a superclass, it must also be a Kotlin class. Neither reflection or codegen
|
||||||
`Object`. Symmetrically, Java types that extend Kotlin types are also unsupported. If you need to
|
support Kotlin types with Java supertypes or Java types with Kotlin supertypes. If you need to
|
||||||
convert these classes to JSON you must create a custom type adatper.
|
convert such classes to JSON you must create a custom type adatper.
|
||||||
|
|
||||||
The JSON encoding of Kotlin types is the same whether using reflection or codegen. Prefer codegen
|
The JSON encoding of Kotlin types is the same whether using reflection or codegen. Prefer codegen
|
||||||
for better performance and to avoid the `kotlin-reflect` dependency; prefer reflection to convert
|
for better performance and to avoid the `kotlin-reflect` dependency; prefer reflection to convert
|
||||||
@@ -569,7 +569,7 @@ Download [the latest JAR][dl] or depend via Maven:
|
|||||||
```
|
```
|
||||||
or Gradle:
|
or Gradle:
|
||||||
```groovy
|
```groovy
|
||||||
implementation 'com.squareup.moshi:moshi:1.5.0'
|
implementation 'com.squareup.moshi:moshi:1.6.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].
|
||||||
|
Reference in New Issue
Block a user