Usageļ¼š

1 visit https://xcore.top to design a model .for example An UserModel(username,password).

2 download the source code and put in your source dir. you will get the source file UserModelWrapper.dart

1.serialize:

        var user = UserModelWrapper();
        user.username = "Jim Green"
        user.password = "123456"
        var writer = XDataWriter();
        var bytes = writer.write(user);
    bytes is an Int8List,you can transform it anywhere now
    
   
    

2. deserialze:

    consider using the bytes above. assume you get from an api call.
    
        var parser = XDataParser();
        var xdata = parser.parse(bytes);
        var user = UserModelWrapper.withData(xdata);
        assert(user.username == "Jim Green")
        assert(user.password == "123456")

3. support datetypes:

orderdatatypesingleListSetStringMapIntMapLongMapFloatMapDoubleMap
1int8intList<int>Set<int>Map<String,int>Map<int,int>Map<int,int>Map<double,int>Map<double,int>
2int16intList<int>Set<int>Map<String,int>Map<int,int>Map<int,int>Map<double,int>Map<double,int>
3int32intList<int>Set<int>Map<String,int>Map<int,int>Map<int,int>Map<double,int>Map<double,int>
4int64intList<int>Set<int>Map<String,int>Map<int,int>Map<int,int>Map<double,int>Map<double,int>
5float32doubleList<double>Set<double>Map<String,double>Map<int,double>Map<int,double>Map<double,double>Map<double,double>
6float64doubleList<double>Set<double>Map<String,double>Map<int,double>Map<int,double>Map<double,double>Map<double,double>
7boolboolList<bool>Set<bool>Map<String,bool>Map<int,bool>Map<int,bool>Map<double,bool>Map<double,bool>
8StringStringList<String>Set<String>Map<String,String>Map<int,String>Map<int,String>Map<double,String>Map<double,String>
9DateTimeDateTimeList<DateTime>Set<DateTime>Map<String,DateTime>Map<int,DateTime>Map<int,DateTime>Map<double,DateTime>Map<double,DateTime>
10Int8ListInt8ListList<Int8List>Set<Int8List>Map<String,Int8List>Map<int,Int8List>Map<int,Int8List>Map<double,Int8List>Map<double,Int8List>
11XDataXDataList<XData>Set<XData>Map<String,XData>Map<int,XData>Map<int,XData>Map<double,XData>Map<double,XData>

Libraries

DoubleMapObjectHolder
IntMapObjectHolder
LinkedBuffer
ListObjectHolder
ObjectHolder
SetObjectHolder
StringMapObjectHolder
X_Data
XBaseRecord
XBaseRecordWrapper
xdata
XDataParser
XDataWrapper
XDataWriter
XObjectRef
XObjectRefWrapper
XType