/*var bm = new BMsg(1, "test", ["xxx" => "yyy"]);
var s:Serializer = new Serializer();
var bs:Bytes = s.serialize(bm);
var c:String = bs.toHex();
File.saveContent("c:/xxx.txt", c);
*/
var c:String = "01010574657374020478787804797979";
var bs:Bytes = Bytes.ofHex(c);
var s:Serializer = new Serializer();
var bs = s.unserialize(bs, BMsg);
trace(bs);//error.
///////////////////////////////
class BMsg implements Serializable
{
@:s public var reqType:Int;
@:s public var apiEnum:String;
@:s public var map:Map<String,String>;
public function new (rt:Int, api:String, map:Map<String,String>){
this.reqType = rt;
this.apiEnum = api;
this.map = map;
}
}
///////////////////
I want post this issue to hxbit ,but it’s was close by ncannasse
and also got the same error
it’s seem haxe still not fixed this bug.
haxe 4.0 rc3