-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
default constructor not found in Kotlin #1593
Comments
This problem was fixed in version 1.1.67.android. |
Thanks for your response. Data Classdata class JsonBean(val signature: String, val list: List<Lists>)
data class Lists(val name: String) Test code val jsonString = """
{
"signature": "8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918",
"lists": [
{
"name":"aaa"
},{
"name":"bbb"
}
]
}
"""
try {
val jsonObject = JSON.parseObject(jsonString, JsonBean::class.javaObjectType)
println(jsonObject)
} catch (e: java.lang.Exception) {
Log.e("fastjson.test", e)
} Exception
Target DeviceAndroid 4.4 API 19 |
Please also check JSON.toJavaObject(Class clazz) I got the same error on 1.1.67.android |
@gam2046 "lists": [ It should be "list", not "lists" |
I am using Springboot 2.1.1, fastjson 1.2.54, Kotlin 1.3.11, the problem exists as well. PS: when I use gson instead, it works.
|
Try this |
什么时候可以修复? |
I've got this
Data Class
Try to serialize
Exception
Fastjson Version
1.1.64.android
The text was updated successfully, but these errors were encountered: