Closed inethui closed 2 years ago
Create a separate model: TypeModel.Create
Thanks for the quick reply. If I create a new type model, does that mean I could not call the methods of "Serializer" anymore, instead, I should call the methods on the model? Is it possible to replace the default type model?
Yes
Is it possible to replace the default runtime type model (RuntimeTypeModel.Default)?
No. Make your own singleton and replace model there.
I see. Thanks!
In unit tests, each test may want to setup their own types. The default model contains configuration for all types, which doesn't fit into the case of unit tests. Is there a way to erase everything registered, or override the existing registration with a different configuration?