kamikat / moshi-jsonapi

JSON API v1.0 Specification in Moshi.
MIT License
156 stars 34 forks source link

Serialized data gone #108

Closed xdbas closed 4 years ago

xdbas commented 4 years ago

hi, when im sending serialized data with in intent all data seem to get lost.

Request
activity?.startActivity(Intent(activity, TestAcitvity::class.java).apply {
       putExtra("appointment_serialized", it.resource as Serializable)
})

TestActivity:
val ap = b.getSerializable("appointment_serialized") as Appointment
Timber.e("ID=" + ap.id)

Logcat: ID=null DOCUMENT=null

What is happening? Appointment is extending Resource

xdbas commented 4 years ago

After some research it seem to happen because my Appointment class was also a parcelable using the kotlin library. Not sure why but the issue is fixed.