ubjson / universal-binary-json-java

Universal Binary JSON Java Library
http://ubjson.org
Apache License 2.0
33 stars 4 forks source link

UBjson cant write with array with object reader, and read the array back in #3

Open ronnyek opened 11 years ago

ronnyek commented 11 years ago

I've created a relatively simple example trying to understand how this is SUPPOSED to work...

I've created a simple user object wiht name email and age on it. I used object writer to write out the stream to disk, then when to read it back out as the original object and get:

org.ubjson.io.UBJFormatException: Encountered an unknown type marker of byte value 5 (char='') at stream position 2. at org.ubjson.io.UBJInputStreamParser.nextType(UBJInputStreamParser.java:121) at org.ubjson.io.reflect.ObjectReader.readObject(ObjectReader.java:51)

ghost commented 11 years ago

Ron, the reflect package hasn't gotten as much love as it should (yet) -- can you email me the POJO and resulting UBJ file to software@thebuzzmedia.com so I can take a look and see where it screwed up?