When I start request using retrofit 2.0, I'm getting this error com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 1 path $
and don't know why, becoause I have a valid json.
I have also seen this kind of error but didn't helped, I don't want to use JsonReader and this kind of stuff
P.S I'm using Gson for converter
[
{
"fullname": "name",
"contact": "blah",
"uid": "001"
},
{
"fullname": "name2",
"contact": "blah2",
"uid": "002"
}
]
this is my call interface method
@FormUrlEncoded
@POST("url")
fun startRequest(@Field("someField") someField: String) : Call<List<MyModelExample>>
and this is my response MyModelExample class
open class MyModelExample : RealmObject() {
@SerializedName("fullname")
var fullName: String? = null
@SerializedName("contact")
var contact: String? = null
@PrimaryKey
@SerializedName("uid")
var uid: String = ""
}