Session

Is your JSON deserialization implementation efficient?

I think we all agree that JSON deserialization is one of the most common tasks we as developers of Dart and Flutter applications, have to perform regularly, which means that implementation efficiency in this area has a significant impact on the overall speed and ease of the development. Yet over and over I see a few pretty common scenarios.

Some folks prefer to do JSON deserialization manually, which is more time-consuming and error-prone than using code generation. And even if they do use code generation, they’d have data models with JSON deserialization logic, corresponding domain models with similar structure, and mappers that copy data back and forth between data and domain models, maybe with slight modifications.

Clearly, such an approach has a big benefit: if there's a change in the data structure received from the backend, the required application change is minimal and is contained in the deserialization logic, so that the domain model structure remains unchanged and thus no further updates are required in the business logic layer and above. This is a very important benefit, and in this session, I’ll show you how to achieve the same result with less code.

An online talk by Anna Leushchenko at the Full Stack Flutter conference on May 28, 2024
https://youtu.be/ySt7lVea_yg

Anna Leushchenko

Google Developer Expert in Dart and Flutter | Author, speaker at tech events, mentor, OSS contributor | Passionate mobile apps creator

Kyiv, Ukraine

Actions

Please note that Sessionize is not responsible for the accuracy or validity of the data provided by speakers. If you suspect this profile to be fake or spam, please let us know.

Jump to top