JSON and serialization

Data & backend

JSON and serialization

Which JSON serialization method is right for me?

Use manual serialization for smaller projects
Use code generation for medium to large projects

Is there a GSON/Jackson/Moshi equivalent in Flutter?

Serializing JSON manually using dart:convert

Serializing JSON inline
Serializing JSON inside model classes

Serializing JSON using code generation libraries

Setting up json_serializable in a project
Creating model classes the json_serializable way
Running the code generation utility

One-time code generation
Generating code continuously


Consuming json_serializable models

Generating code for nested classes

Further references