any reason not to just say `json.definitions = custom_types` or something?