japx
2.2.0, released 3 years ago by infinum.com
Lightweight parser that flattens and builds JSON:API structures.
WASM-ready
What it does
Provides functions to decode JSON:API responses into plain JSON maps and encode plain JSON maps back into JSON:API format. Handles relationships, meta, links and supports null attributes.
AI-written summary of version 2.2.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to integrate a JSON:API backend without adding heavy dependencies
- You want a simple way to convert between JSON:API and flat JSON for use with json_serializable
Skip it when
- You require full JSON:API client features like networking or pagination handling
- You need code generation for model classes
Strengths
- Zero Flutter dependency, works on all Dart platforms
- Handles complex relationships and meta data
- Supports Dart 3 and null safety
Weaknesses
- Only handles encoding/decoding, no networking utilities
- Limited to Map<String,dynamic> transformations
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
import 'package:japx/japx.dart';
void main(){
final apiResponse = {
'data':{'id':'1','type':'users','attributes':{'email':'john@infinum.co','username':'john'}}
};
final flat = Japx.decode(apiResponse);
print(flat);
}Alternatives
Packages that do the same job and could replace japx.
- json_schema
Validate JSON data against JSON Schema drafts in Dart.
63Compare - dart_pdf_reader
Pure‑dart PDF parser that reads PDF structures from a byte stream.
62Compare - unicode
Library providing Unicode character utilities and emoji data generated from Unicode 17.0.0
54Compare - version
Parses and compares semantic version numbers in compliance with http://semver.org/
50Compare