A custom deserializer that's easily tweaked for each of your Id types may be workable
m
A custom deserializer that's easily tweaked for each of your Id types may be workable