You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to get this value from JSON string, I'm getting this exception
Exception in thread "main" java.lang.ClassCastException: class java.util.LinkedHashMap cannot be cast to class com.holonplatform.core.property.PropertyBox (java.util.LinkedHashMap is in module java.base of loader 'bootstrap'; com.holonplatform.core.property.PropertyBox is in unnamed module of loader 'app')
at java.base/java.util.ArrayList$Itr.forEachRemaining(ArrayList.java:999)
at com.example.application.data.test.TestJson.lambda$getDasaEntries$2(TestJson.java:234)
at java.base/java.util.Optional.ifPresent(Optional.java:176)
at com.example.application.data.test.TestJson.lambda$getDasaEntries$3(TestJson.java:232)
at java.base/java.util.Optional.ifPresent(Optional.java:176)
at com.example.application.data.test.TestJson.getDasaEntries(TestJson.java:230)
at com.example.application.data.test.TestJson.test(TestJson.java:152)
at com.example.application.data.test.TestJson.main(TestJson.java:63)
This is where I'm getting the error
responseBox.getValueIfPresent(VimshottariDasa.VIMSHOTTARIDASA)
.ifPresent(propertyBox -> {
propertyBox.getValueIfPresent(VimshottariDasa.DASAENTRIES)
.ifPresent(propertyBoxes -> {
for (PropertyBox box : propertyBoxes) { // error line
}
Looks there is some problem in casting and the below proves the same.
I'm trying to deserialize a json string which contains an Array.
When trying to get this value from JSON string, I'm getting this exception
This is where I'm getting the error
Looks there is some problem in casting and the below proves the same.
Could you please check this ?
The text was updated successfully, but these errors were encountered: