beforeSerialize method
Implementation
@override
Object? beforeSerialize(Object? object, FullType specifiedType) {
if (_unsupportedTypes.contains(specifiedType.root)) {
throw ArgumentError(
'Standard JSON cannot serialize type ${specifiedType.root}.');
}
return object;
}