Is it accepted behaviour that MessagePack official implementation in Java serializes public fields as Arrays?
In what universe is this "like JSON"?
My case: I have a simple class like so:
@Message
public class MySuperClass(){
public int mySuperID; // let's say 4
public byte[] mySuperData; // let's say nothing
public String mySuperType; // let's say null
public String mySuperExtra; // let's say HI!
public MySuperClass(){}
// other constructors
}
And i'm simply serializing with
MessagePack msgpack = new MessagePack();
msgpack.write(mySuperInstance);
And sending that to a distant server written in NodeJS.
Node JS can easily unpack it, to
['HI!', �, 4, null]
Which means that MessagePack is nothing like JSON, because it parses Java objects as arrays and then only repopulates them alphabetically!
Does anyone have a solution that does not include mapping every object I have? (Also HashMap is not unpackable by Node, which means that messagePack is not cross-platform ,thus, repeating, noting like JSON)