You need to register them at build time for the generated code to use your types. You can at the same time specify how to convert from Json (adapters), or do that part at runtime. I think in most cases it will make sense to do both at build time. You may need to register the adapters at runtime if this needs to be dynamic (not actually sure of a use case).