mirror of
https://github.com/fankes/moshi.git
synced 2025-10-19 16:09:21 +08:00
Completely remove companion object jsonAdapter extension function gen
It's broken currently (see #611), and after talking with @swankjesse decided it's best to just nix this API
This commit is contained in:
@@ -824,22 +824,6 @@ class GeneratedAdaptersTest {
|
||||
@JsonClass(generateAdapter = true)
|
||||
class DuplicateValue(var a: Int = -1, var b: Int = -2)
|
||||
|
||||
@Test fun companionObjectsTests() {
|
||||
val moshi = Moshi.Builder().build()
|
||||
val standardAdapter = CompanionObjectClass.jsonAdapter(moshi)
|
||||
val customNameAdapter = NamedCompanionObjectClass.jsonAdapter(moshi)
|
||||
}
|
||||
|
||||
@JsonClass(generateAdapter = true)
|
||||
data class CompanionObjectClass(val foo: String) {
|
||||
companion object
|
||||
}
|
||||
|
||||
@JsonClass(generateAdapter = true)
|
||||
data class NamedCompanionObjectClass(val foo: String) {
|
||||
companion object CustomCompanionObject
|
||||
}
|
||||
|
||||
@Test fun extensionProperty() {
|
||||
val moshi = Moshi.Builder().build()
|
||||
val jsonAdapter = moshi.adapter(ExtensionProperty::class.java)
|
||||
|
Reference in New Issue
Block a user