{"action":"closed","issue":{"url":"https://api.github.com/repos/ligboy/retrofit-converter-fastjson/issues/3","repository_url":"https://api.github.com/repos/ligboy/retrofit-converter-fastjson","labels_url":"https://api.github.com/repos/ligboy/retrofit-converter-fastjson/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/ligboy/retrofit-converter-fastjson/issues/3/comments","events_url":"https://api.github.com/repos/ligboy/retrofit-converter-fastjson/issues/3/events","html_url":"https://github.com/ligboy/retrofit-converter-fastjson/issues/3","id":177654711,"number":3,"title":"如下错误信息，求速回！","user":{"login":"parcool","id":12092478,"avatar_url":"https://avatars.githubusercontent.com/u/12092478?v=3","gravatar_id":"","url":"https://api.github.com/users/parcool","html_url":"https://github.com/parcool","followers_url":"https://api.github.com/users/parcool/followers","following_url":"https://api.github.com/users/parcool/following{/other_user}","gists_url":"https://api.github.com/users/parcool/gists{/gist_id}","starred_url":"https://api.github.com/users/parcool/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/parcool/subscriptions","organizations_url":"https://api.github.com/users/parcool/orgs","repos_url":"https://api.github.com/users/parcool/repos","events_url":"https://api.github.com/users/parcool/events{/privacy}","received_events_url":"https://api.github.com/users/parcool/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-18T14:24:57Z","updated_at":"2016-09-19T02:37:02Z","closed_at":"2016-09-19T02:37:02Z","body":"`09-18 22:15:51.981 7318-7318/android.test.parcool W/System.err: com.alibaba.fastjson.JSONException: syntax error, expect {, actual pos 264, json : {\"responseCode\":1,\"source\":\"Android_\",\"object\":\"{\\\"versionCode\\\":2,\\\"log\\\":\\\"XXX\\\",\\\"url\\\":\\\"https://xxx/app-debug.apk\\\"}\",\"responseMsg\":\"获取数据成功!\",\"datetime\":1474208151634}, fieldName object\r\n09-18 22:15:51.981 7318-7318/android.test.parcool W/System.err:     at com.alibaba.fastjson.parser.JavaBeanDeserializer.deserialze(JavaBeanDeserializer.java:384)\r\n09-18 22:15:51.981 7318-7318/android.test.parcool W/System.err:     at com.alibaba.fastjson.parser.JavaBeanDeserializer.deserialze(JavaBeanDeserializer.java:97)\r\n09-18 22:15:51.981 7318-7318/android.test.parcool W/System.err:     at com.alibaba.fastjson.parser.DefaultFieldDeserializer.parseField(DefaultFieldDeserializer.java:45)\r\n09-18 22:15:51.981 7318-7318/android.test.parcool W/System.err:     at com.alibaba.fastjson.parser.JavaBeanDeserializer.parseField(JavaBeanDeserializer.java:788)\r\n09-18 22:15:51.981 7318-7318/android.test.parcool W/System.err:     at com.alibaba.fastjson.parser.JavaBeanDeserializer.deserialze(JavaBeanDeserializer.java:648)\r\n09-18 22:15:51.981 7318-7318/android.test.parcool W/System.err:     at com.alibaba.fastjson.parser.JavaBeanDeserializer.deserialze(JavaBeanDeserializer.java:97)\r\n09-18 22:15:51.981 7318-7318/android.test.parcool W/System.err:     at com.alibaba.fastjson.parser.DefaultJSONParser.parseObject(DefaultJSONParser.java:682)\r\n09-18 22:15:51.981 7318-7318/android.test.parcool W/System.err:     at com.alibaba.fastjson.parser.DefaultJSONParser.parseObject(DefaultJSONParser.java:655)\r\n09-18 22:15:51.981 7318-7318/android.test.parcool W/System.err:     at com.alibaba.fastjson.JSON.parseObject(JSON.java:216)\r\n09-18 22:15:51.981 7318-7318/android.test.parcool W/System.err:     at com.alibaba.fastjson.JSON.parseObject(JSON.java:188)\r\n09-18 22:15:51.981 7318-7318/android.test.parcool W/System.err:     at retrofit2.converter.fastjson.FastJsonResponseBodyConverter.convert(FastJsonResponseBodyConverter.java:33)\r\n09-18 22:15:51.981 7318-7318/android.test.parcool W/System.err:     at retrofit2.converter.fastjson.FastJsonResponseBodyConverter.convert(FastJsonResponseBodyConverter.java:12)\r\n09-18 22:15:51.981 7318-7318/android.test.parcool W/System.err:     at retrofit2.ServiceMethod.toResponse(ServiceMethod.java:117)\r\n09-18 22:15:51.981 7318-7318/android.test.parcool W/System.err:     at retrofit2.OkHttpCall.parseResponse(OkHttpCall.java:211)\r\n09-18 22:15:51.981 7318-7318/android.test.parcool W/System.err:     at retrofit2.OkHttpCall.execute(OkHttpCall.java:174)\r\n09-18 22:15:51.981 7318-7318/android.test.parcool W/System.err:     at retrofit2.adapter.rxjava.RxJavaCallAdapterFactory$RequestArbiter.request(RxJavaCallAdapterFactory.java:171)\r\n09-18 22:15:51.981 7318-7318/android.test.parcool W/System.err:     at rx.internal.operators.OperatorSubscribeOn$1$1$1.request(OperatorSubscribeOn.java:80)\r\n09-18 22:15:51.981 7318-7318/android.test.parcool W/System.err:     at rx.Subscriber.setProducer(Subscriber.java:211)\r\n09-18 22:15:51.981 7318-7318/android.test.parcool W/System.err:     at rx.internal.operators.OperatorSubscribeOn$1$1.setProducer(OperatorSubscribeOn.java:76)\r\n09-18 22:15:51.981 7318-7318/android.test.parcool W/System.err:     at rx.Subscriber.setProducer(Subscriber.java:205)\r\n09-18 22:15:51.981 7318-7318/android.test.parcool W/System.err:     at rx.Subscriber.setProducer(Subscriber.java:205)\r\n09-18 22:15:51.981 7318-7318/android.test.parcool W/System.err:     at retrofit2.adapter.rxjava.RxJavaCallAdapterFactory$CallOnSubscribe.call(RxJavaCallAdapterFactory.java:152)\r\n09-18 22:15:51.981 7318-7318/android.test.parcool W/System.err:     at retrofit2.adapter.rxjava.RxJavaCallAdapterFactory$CallOnSubscribe.call(RxJavaCallAdapterFactory.java:138)\r\n09-18 22:15:51.981 7318-7318/android.test.parcool W/System.err:     at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:50)\r\n09-18 22:15:51.981 7318-7318/android.test.parcool W/System.err:     at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)\r\n09-18 22:15:51.981 7318-7318/android.test.parcool W/System.err:     at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:50)\r\n09-18 22:15:51.981 7318-7318/android.test.parcool W/System.err:     at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)\r\n09-18 22:15:51.981 7318-7318/android.test.parcool W/System.err:     at rx.Observable.unsafeSubscribe(Observable.java:8666)\r\n09-18 22:15:51.981 7318-7318/android.test.parcool W/System.err:     at rx.internal.operators.OperatorSubscribeOn$1.call(OperatorSubscribeOn.java:94)\r\n09-18 22:15:51.981 7318-7318/android.test.parcool W/System.err:     at rx.internal.schedulers.CachedThreadScheduler$EventLoopWorker$1.call(CachedThreadScheduler.java:220)\r\n09-18 22:15:51.981 7318-7318/android.test.parcool W/System.err:     at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:55)\r\n09-18 22:15:51.981 7318-7318/android.test.parcool W/System.err:     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423)\r\n09-18 22:15:51.981 7318-7318/android.test.parcool W/System.err:     at java.util.concurrent.FutureTask.run(FutureTask.java:237)\r\n09-18 22:15:51.981 7318-7318/android.test.parcool W/System.err:     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:154)\r\n09-18 22:15:51.981 7318-7318/android.test.parcool W/System.err:     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:269)\r\n09-18 22:15:51.981 7318-7318/android.test.parcool W/System.err:     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)\r\n09-18 22:15:51.981 7318-7318/android.test.parcool W/System.err:     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)\r\n09-18 22:15:51.981 7318-7318/android.test.parcool W/System.err:     at java.lang.Thread.run(Thread.java:818)`\r\n\r\n这是完整JSON字符串：\r\n`{\"responseCode\":1,\"source\":\"Android_\",\"object\":\"{\\\"versionCode\\\":2,\\\"log\\\":\\\"XXX\\\",\\\"url\\\":\\\"https://xxx/app-debug.apk\\\"}\",\"responseMsg\":\"获取数据成功!\",\"datetime\":1474208151634}`\r\n\r\n解析的实体：\r\n`public class UpdateVersionModel {\r\n    private String log;\r\n    private String url;\r\n    private int versionCode;\r\n\r\n    public String getLog() {\r\n        return log;\r\n    }\r\n\r\n    public void setLog(String log) {\r\n        this.log = log;\r\n    }\r\n\r\n    public String getUrl() {\r\n        return url;\r\n    }\r\n\r\n    public void setUrl(String url) {\r\n        this.url = url;\r\n    }\r\n\r\n    public int getVersionCode() {\r\n        return versionCode;\r\n    }\r\n\r\n    public void setVersionCode(int versionCode) {\r\n        this.versionCode = versionCode;\r\n    }\r\n}`\r\n\r\n当然，前面还有一个BaseModel：\r\n` public class BaseResultModel<人工空格T>{\r\n    private String source;\r\n    private String target;\r\n    private String action;\r\n    private long datetime;\r\n    private String responseCode;\r\n    private String responseMsg;\r\n    private T object;\r\n\r\n    public String getSource() {\r\n        return source;\r\n    }\r\n\r\n    public void setSource(String source) {\r\n        this.source = source;\r\n    }\r\n\r\n    public String getTarget() {\r\n        return target;\r\n    }\r\n\r\n    public void setTarget(String target) {\r\n        this.target = target;\r\n    }\r\n\r\n    public String getAction() {\r\n        return action;\r\n    }\r\n\r\n    public void setAction(String action) {\r\n        this.action = action;\r\n    }\r\n\r\n    public long getDatetime() {\r\n        return datetime;\r\n    }\r\n\r\n    public void setDatetime(long datetime) {\r\n        this.datetime = datetime;\r\n    }\r\n\r\n    public String getResponseCode() {\r\n        return responseCode;\r\n    }\r\n\r\n    public void setResponseCode(String responseCode) {\r\n        this.responseCode = responseCode;\r\n    }\r\n\r\n    public String getResponseMsg() {\r\n        return responseMsg;\r\n    }\r\n\r\n    public void setResponseMsg(String responseMsg) {\r\n        this.responseMsg = responseMsg;\r\n    }\r\n\r\n    public T getObject() {\r\n        return object;\r\n    }\r\n\r\n    public void setObject(T object) {\r\n        this.object = object;\r\n    }\r\n}`\r\n\r\n解析的实体格式就是BaseModel<人工空格UpdateVersionModel >。求速回~"}}
{"actor":{"display_login":"ligboy"}}