serde 1.0.6

Dart native js
Flutter Android iOS web

This packages contain the annotations for the package dart_serde.

Dart Serde #

The aim of that package is provide an easy and friendly interface to use serialization and deserialization for classes;

Installation #

Add to dependencies #

Add those to your pubspec

dependencies:
  serde: ^1.0.0

dev_dependencies:
  build_runner: ^1.0.0
  serde_generator: ^1.0.0

Run pub get

Getting started #

Given the class

class Public {
    final bool mustShow;
    final int number;
}

To map a json into it, and from it you must do:

@Serde()
class Public {...}

And thats it.

If you have special conditions for some keys, that is treatable. Lets assume, for example, that the field musShow, comes int he json with the name show, and nested in the structure, wrapped by the mapper

@Serde()
class Public {
    @Prop(name: 'show', isNested: true, path: 'mapper')
    final bool mustShow;
    final int number;
}
0
likes
100
pub points
0%
popularity

This packages contain the annotations for the package dart_serde.

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

eduardoaikin@gmail.com

License

BSD (LICENSE)

Dependencies

build, source_gen

More

Packages that depend on serde