serializer

Creator: coderz1093

Last updated:

0 purchases

serializer Images
Add to Cart

Description:

serializer

DISCLAIMER
No maintenance on this package anymore. Prefer to use build_value
Documentation aren't aligned with last version.
Serializer #
Serialize and Deserialize Dart Object with reflectable or codegen
Codecs supported: #

Json

Example #
import 'package:serializer/serializer_reflectable.dart';

@serializable
class MyModel {
String name;

//constructor need to be without parameters or with optional or positional.
MyModel([this.name]);
}

main() {
Serializer serializer = new ReflectableSerializer.Json();

//serialize
MyModel model = new MyModel("John", 24);
String json = serializer.encode(model);
Map jsonMap = serializer.toMap(model);

//deserialize
model = serializer.decode(json, MyModel);
model = serializer.fromMap(jsonMap, MyModel);
}
copied to clipboard
Documentations #

Getting Started
Object Definition
Complexe objects (Map, List ...)
JSON
More docs

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.

Related Products

More From This Creator