json_parser_annotations 1.0.1 copy "json_parser_annotations: ^1.0.1" to clipboard
json_parser_annotations: ^1.0.1 copied to clipboard

Annotations to support analysis and code-gen features for json_parser package.

json_parser_annotations #

Annotations to support analysis and code-gen features for json_parser package.

Note: This package is a part of the json_parser suite.

Overview #

Defines annotations to support analysis and code-gen features for json_parser package.

Installation #

From pub.dev

Add this to your pubspec.yaml

dependencies:
  json_parser_annotations: ^1.0.1

Or, From Git repo

dependencies:
  json_parser_annotations:
    git:
      url: https://github.com/Ragibn5/dart-flutter-packages.git
      path: json_parser/json_parser_annotations
      ref: json_parser/json_parser_annotations-1.0.1

Usage #

Annotate the components you want to expose:

import 'package:json_parser_annotations/json_parser_annotations.dart';

@GenerateJsonParser()
class User {
  final int id;
  final String name;

  User(this.id, this.name);

  @override
  String toString() {
    return 'User{id: $id, name: $name}';
  }
}

Once annotated, generators, analyzers and other tools can find these components and apply their integrations.

Example #

See the example for a complete demonstration of all the annotations.

0
likes
160
points
109
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Annotations to support analysis and code-gen features for json_parser package.

Homepage
Repository (GitHub)
View/report issues

License

BSD-3-Clause (license)

More

Packages that depend on json_parser_annotations