Test custom serialization of ID to JSON