fromValue is used in our custom json parsers to provide UNRECOGNIZED. valueOf is used automatically otherwise. However, you can't override valueOf. Now, having looked at it some more, I think I can remove UNRECOGNIZED and fromValue. This will simplify the code without losing functionality.