dogs_core 4.2.0 copy "dogs_core: ^4.2.0" to clipboard
dogs_core: ^4.2.0 copied to clipboard

a universal serialization library using code generation to reduce boilerplate massively.

DOGs discord gitbook melos

DOGs, short for Dart Object Graphs, is a universal serialization library for dart making strong use of code generation to reduce boilerplate massively. Dogs can be easily extended to support a wide array of encodings and comes with json support out of the box.

@serializable
class Person {
  
  @LengthRange(max: 128)
  final String name;
  
  @Minimum(18)
  final int age;

  @SizeRange(max: 16)
  @Regex("((_)?[a-z]+[A-Za-z0-9]*)+")
  final Set<String>? tags;
  
  Person(this.name, this.age, this.tags);

}

Features #

  • Builder extensions (supporting nullability)
  • Copyable types (supporting map overrides)
  • OpenApi Schema Generation (using conduit_open_api)
  • Validation API (similar to javax.validation)
  • Generator-less external extensibility

Format Support #

  • JSON (included in dogs_core)
  • YAML (package dogs_yaml)
  • TOML (package dogs_toml)
  • CBOR (package dogs_cbor)

Silent Code Generation #

A neat point about dogs 'darwin like' non-intrusive code generation is, that it has almost zero boilerplate and generally doesn't require importing or referencing generated source code, except for just a few cases. This allows you to keep on working on your code, without having to wait for the build runner to create your required files for every new service you create and plan to use. This also minimizes conflicts with other external generators and helps to prevent unexpected build runner crashes.

6
likes
0
pub points
41%
popularity

Publisher

verified publisherhelight.dev

a universal serialization library using code generation to reduce boilerplate massively.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

aqueduct_isolates, collection, conduit_open_api, lyell, meta

More

Packages that depend on dogs_core