Is there a way to configure gson to ignore an unknown enum value? For example

in my client code there is an enum DeviceType has 2 enum value : PC, MOBILE

But when a server is sent another type for example MAC as another DeviceType. How can I configure my gson deserilalizer to set the DeviceType = null instead of throwing an exception?

Thanks,

Sean

Edit
Report