xdata 0.0.6 copy "xdata: ^0.0.6" to clipboard
xdata: ^0.0.6 copied to clipboard

outdated

xdata is cross-platform serialize framework, that can transform model amoung java, javascript,objective-c and dart.

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: #

   1  int8
   2  int16
   3  int32
   4  int64
   5  float32
   6  float64
   7  boolean
   8  String
   9  DateTime(int64)
   10 bytes
   11 XData
   12 List of above
0
likes
0
points
61
downloads

Publisher

verified publisherxcore.top

Weekly Downloads

xdata is cross-platform serialize framework, that can transform model amoung java, javascript,objective-c and dart.

Homepage

License

unknown (license)

More

Packages that depend on xdata