{"action":"created","issue":{"url":"https://api.github.com/repos/grandstaish/paperparcel/issues/116","repository_url":"https://api.github.com/repos/grandstaish/paperparcel","labels_url":"https://api.github.com/repos/grandstaish/paperparcel/issues/116/labels{/name}","comments_url":"https://api.github.com/repos/grandstaish/paperparcel/issues/116/comments","events_url":"https://api.github.com/repos/grandstaish/paperparcel/issues/116/events","html_url":"https://github.com/grandstaish/paperparcel/issues/116","id":191883603,"number":116,"title":"Custom TypeAdapter for Pair (kotlin) not working","user":{"login":"Bodo1981","id":1597580,"avatar_url":"https://avatars.githubusercontent.com/u/1597580?v=3","gravatar_id":"","url":"https://api.github.com/users/Bodo1981","html_url":"https://github.com/Bodo1981","followers_url":"https://api.github.com/users/Bodo1981/followers","following_url":"https://api.github.com/users/Bodo1981/following{/other_user}","gists_url":"https://api.github.com/users/Bodo1981/gists{/gist_id}","starred_url":"https://api.github.com/users/Bodo1981/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bodo1981/subscriptions","organizations_url":"https://api.github.com/users/Bodo1981/orgs","repos_url":"https://api.github.com/users/Bodo1981/repos","events_url":"https://api.github.com/users/Bodo1981/events{/privacy}","received_events_url":"https://api.github.com/users/Bodo1981/received_events","type":"User","site_admin":false},"labels":[{"id":301648658,"url":"https://api.github.com/repos/grandstaish/paperparcel/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":{"login":"grandstaish","id":2288921,"avatar_url":"https://avatars.githubusercontent.com/u/2288921?v=3","gravatar_id":"","url":"https://api.github.com/users/grandstaish","html_url":"https://github.com/grandstaish","followers_url":"https://api.github.com/users/grandstaish/followers","following_url":"https://api.github.com/users/grandstaish/following{/other_user}","gists_url":"https://api.github.com/users/grandstaish/gists{/gist_id}","starred_url":"https://api.github.com/users/grandstaish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grandstaish/subscriptions","organizations_url":"https://api.github.com/users/grandstaish/orgs","repos_url":"https://api.github.com/users/grandstaish/repos","events_url":"https://api.github.com/users/grandstaish/events{/privacy}","received_events_url":"https://api.github.com/users/grandstaish/received_events","type":"User","site_admin":false},"assignees":[{"login":"grandstaish","id":2288921,"avatar_url":"https://avatars.githubusercontent.com/u/2288921?v=3","gravatar_id":"","url":"https://api.github.com/users/grandstaish","html_url":"https://github.com/grandstaish","followers_url":"https://api.github.com/users/grandstaish/followers","following_url":"https://api.github.com/users/grandstaish/following{/other_user}","gists_url":"https://api.github.com/users/grandstaish/gists{/gist_id}","starred_url":"https://api.github.com/users/grandstaish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grandstaish/subscriptions","organizations_url":"https://api.github.com/users/grandstaish/orgs","repos_url":"https://api.github.com/users/grandstaish/repos","events_url":"https://api.github.com/users/grandstaish/events{/privacy}","received_events_url":"https://api.github.com/users/grandstaish/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/grandstaish/paperparcel/milestones/1","html_url":"https://github.com/grandstaish/paperparcel/milestones/2.0","labels_url":"https://api.github.com/repos/grandstaish/paperparcel/milestones/1/labels","id":1966920,"number":1,"title":"2.0","description":null,"creator":{"login":"grandstaish","id":2288921,"avatar_url":"https://avatars.githubusercontent.com/u/2288921?v=3","gravatar_id":"","url":"https://api.github.com/users/grandstaish","html_url":"https://github.com/grandstaish","followers_url":"https://api.github.com/users/grandstaish/followers","following_url":"https://api.github.com/users/grandstaish/following{/other_user}","gists_url":"https://api.github.com/users/grandstaish/gists{/gist_id}","starred_url":"https://api.github.com/users/grandstaish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grandstaish/subscriptions","organizations_url":"https://api.github.com/users/grandstaish/orgs","repos_url":"https://api.github.com/users/grandstaish/repos","events_url":"https://api.github.com/users/grandstaish/events{/privacy}","received_events_url":"https://api.github.com/users/grandstaish/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":10,"state":"open","created_at":"2016-08-27T05:30:55Z","updated_at":"2016-11-28T06:44:31Z","due_on":null,"closed_at":null},"comments":9,"created_at":"2016-11-27T20:31:24Z","updated_at":"2016-11-28T09:38:23Z","closed_at":null,"body":"Your library is really great, but i get an error message writing a custom typeadapter\r\n\r\n``` kotlin\r\n@RegisterAdapter object PairAdapter : TypeAdapter<Pair<String, String>> {\r\n  override fun readFromParcel(source: Parcel): Pair<String, String> {\r\n    return Pair(source.readString(), source.readString())\r\n  }\r\n\r\n  override fun writeToParcel(value: Pair<String, String>, dest: Parcel, flags: Int) {\r\n    dest.writeString(value.first)\r\n    dest.writeString(value.second)\r\n  }\r\n}\r\n```\r\n\r\ndata class with pair object:\r\n```kotlin\r\n@PaperParcel data class ObjectWithPair(val pair: Pair<String, String>) : Parcelable {\r\n  companion object {\r\n    @JvmField val CREATOR = PaperParcelObjectWithPair.CREATOR\r\n  }\r\n\r\n  override fun describeContents() = 0\r\n\r\n  override fun writeToParcel(dest: Parcel, flags: Int) {\r\n    PaperParcelObjectWithPair.writeToParcel(this, dest, flags)\r\n  }\r\n}\r\n```\r\nerror message:\r\nUnknown type kotlin.Pair<java.lang.String,java.lang.String>. Define a TypeAdapter to handle custom types. For more info, see https://github.com/grandstaish/paperparcel.\r\n\r\ni have also tested to explicitly define the typedapter with the full qualified package name like the error mentioned, but this didn´t work either\r\n\r\n``` kotlin\r\n@RegisterAdapter object PairAdapter : TypeAdapter<kotlin.Pair<java.lang.String, java.lang.String>> {\r\n...\r\n}\r\n```\r\n\r\nThe example DateTypeAdapter is working as expected but not the Pair Adapter. Maybe you could have a look at it.\r\n\r\nI am using the newest version: 2.0.0-beta1\r\n\r\nThx"},"comment":{"url":"https://api.github.com/repos/grandstaish/paperparcel/issues/comments/263224984","html_url":"https://github.com/grandstaish/paperparcel/issues/116#issuecomment-263224984","issue_url":"https://api.github.com/repos/grandstaish/paperparcel/issues/116","id":263224984,"user":{"login":"grandstaish","id":2288921,"avatar_url":"https://avatars.githubusercontent.com/u/2288921?v=3","gravatar_id":"","url":"https://api.github.com/users/grandstaish","html_url":"https://github.com/grandstaish","followers_url":"https://api.github.com/users/grandstaish/followers","following_url":"https://api.github.com/users/grandstaish/following{/other_user}","gists_url":"https://api.github.com/users/grandstaish/gists{/gist_id}","starred_url":"https://api.github.com/users/grandstaish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grandstaish/subscriptions","organizations_url":"https://api.github.com/users/grandstaish/orgs","repos_url":"https://api.github.com/users/grandstaish/repos","events_url":"https://api.github.com/users/grandstaish/events{/privacy}","received_events_url":"https://api.github.com/users/grandstaish/received_events","type":"User","site_admin":false},"created_at":"2016-11-28T09:38:23Z","updated_at":"2016-11-28T09:38:23Z","body":"Ah ok, I'll try the multi-module thing now and get back"}}
{"actor":{"display_login":"grandstaish"}}