Creating Custom built_value Serializers with BuiltValueSerializer
Published in
3 min readFeb 8, 2019
When using built_value for JSON serializing and deserializing, we might have some cases that go beyond the capabilities of StandardJsonPlugin
.
Imagine the following problem: you have an API endpoint that can give you two different types of data structures for the same value as shown in the following example:
In our flutter app, we might want to have an object that can have both values, and then we decide what we show in our Widgets.