Example of use of reviver and toEncodable functions, to encode and decode a JSON with a List of Object in dart