jdereg / json-io

Convert Java to JSON. Convert JSON to Java. Pretty print JSON. Java JSON serializer. Deep copy Java object graphs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AtomicInteger deserialization

Scitz0 opened this issue · comments

There seems to be an issue with deserialization of AtomicInteger.

If I set a value and serialize the object conaining the AtomicInteger it is written correctly to disk.
But when I deserialize the object this variable gets a value of 0.

Java version "1.8.0_102". Using Json-IO 4.8.0 from Maven repository.

I did a test to replace AtomicInteger with the new Java 8 LongAdder, seems Json-io fails to handle this new type. Serializing I just get an empty result, see below. But this is a separate issue.

"_test":{

}

I will look into this.

Ok great, would be nice if you manage to find a solution for this.

Implemented AtomicBoolean, AtomicInteger, and AtomicLong support.