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
import io.advantageous.boon.json.JsonFactory;
import io.advantageous.boon.json.ObjectMapper;
import org.junit.Test;
public class TestSerialization {
private final ObjectMapper mapper = JsonFactory.create();
class ThisIsAnInt {
public int value = -1062731519;
}
@Test
public void testDeserialize() {
String json = mapper.toJson(new ThisIsAnInt());
mapper.fromJson(json, ThisIsAnInt.class);
}
}
MESSAGE: fieldName value of class class nl.spero.hostrank.classifier.test.TestSerialization$ThisIsAnInt had issues for value -1062731519 for field FieldInfo [name=value, type=int, parentType=class nl.spero.hostrank.classifier.test.TestSerialization$ThisIsAnInt]
CAUSE io.advantageous.boon.core.Exceptions$SoftenedException :: not an int
ROOT CAUSE MESSAGE: not an int
This happens around this area in your code.
io.advantageous.boon.core.reflection.MapperSimple.fromValueMap(MapperSimple.java:1134)
io.advantageous.boon.json.JsonMappingParser.finalExtract(JsonMappingParser.java:210)
io.advantageous.boon.json.JsonMappingParser.parse(JsonMappingParser.java:202)
io.advantageous.boon.json.implementation.ObjectMapperImpl.readValue(ObjectMapperImpl.java:68)
io.advantageous.boon.json.implementation.ObjectMapperImpl.fromJson(ObjectMapperImpl.java:279)
The text was updated successfully, but these errors were encountered:
Looks like something went wrong during testing. I initially used version 0.6.1 to run this test where it failed. Then I updated to the latest 0.6.6 and got the same error. However, I cannot reproduce it now. I tried some other versions and can get the code to fail reliably for version 0.6.3 and lower. But no longer in the latest version. Perhaps there was a caching error of some kind on my side.
Apologies.
The text was updated successfully, but these errors were encountered: