mirror of
https://github.com/fankes/moshi.git
synced 2025-10-19 16:09:21 +08:00
Convert JsonAdapter
to Kotlin (#1475)
* Rename .java to .kt * Convert JsonAdapter to Kotlin Note that there's more to be done here I think, namely exploring removing the NonNull adapter and making the nullSafe() adapter public so that nullability is directly in the API. Saving that for another day though * Update a couple usages * Fix override * Add exclusion for open * Add `@Language` annotation for json strings Allows the IDE to automatically make this pretty * Spotless * Nullable Co-authored-by: Egor Andreevich <egor@squareup.com> * When Co-authored-by: Parth Padgaonkar <1294660+JvmName@users.noreply.github.com> * Another when * Spotless Co-authored-by: Egor Andreevich <egor@squareup.com> Co-authored-by: Parth Padgaonkar <1294660+JvmName@users.noreply.github.com>
This commit is contained in:
@@ -190,7 +190,7 @@ internal class KotlinJsonAdapter<T>(
|
||||
}
|
||||
|
||||
public class KotlinJsonAdapterFactory : JsonAdapter.Factory {
|
||||
override fun create(type: Type, annotations: MutableSet<out Annotation>, moshi: Moshi):
|
||||
override fun create(type: Type, annotations: Set<Annotation>, moshi: Moshi):
|
||||
JsonAdapter<*>? {
|
||||
if (annotations.isNotEmpty()) return null
|
||||
|
||||
|
Reference in New Issue
Block a user