json_api 0.2.0 json_api: ^0.2.0 copied to clipboard
JSON:API v1.0 (http://jsonapi.org) Document, Client, and Server
Implementation of JSON:API v1.0 in Dart #
Feature roadmap #
Client
- Fetching single resources and resource collections
- Fetching relationships and related resources and collections
- Fetching single resources
- Creating resources
- Deleting resources
- Updating resource's attributes
- Updating resource's relationships
- Updating relationships
- Asynchronous processing
- Optional check for
Content-Type
header in incoming responses
Server (The Server API is not stable yet!)
- Fetching single resources and resource collections
- Fetching relationships and related resources and collections
- Fetching single resources
- Creating resources
- Deleting resources
- Updating resource's attributes
- Updating resource's relationships
- Updating relationships
- Inclusion of related resources
- Sparse fieldsets
- Sorting, pagination, filtering
- Asynchronous processing
- Optional check for
Content-Type
header in incoming requests - Support annotations in resource mappers (?)
Document (The Document API is not stable yet!)
- Support
meta
members - Support
jsonapi
members - Structure Validation including compound documents
- Support relationship objects lacking the
data
member - Naming Validation
- JSON:API v1.1 features
Usage #
In the VM:
import 'package:json_api/client.dart';
final client = JsonApiClient();
In a browser:
import 'package:json_api/client.dart';
import 'package:http/browser_client.dart';
final client = JsonApiClient(factory: () => BrowserClient());
For usage examples see the functional tests.