json_api_document 0.3.1 json_api_document: ^0.3.1 copied to clipboard
JSON API (or jsonapi, see http://jsonapi.org) implementation in Dart2. Builds JSON API Documents according to the standard.
Building stuff #
build.dart builds a new JSON API Document and prints its JSON representation.
Run
dart example/build.dart
to produce a sample JSON API Document. For your convenience, document.json already contains the pretty-printed version of this document.
Parsing stuff #
parse.dart parses any JSON API document from the standard input.
Run
dart example/parse.dart < example/document.json
to parse the example document. This will produce the following output:
This is DataDocument
The primary data is ResourceListData with 1 resource(s).
The document contains 3 included resource(s).