json_serializable: refactor enum logic (#1204)
json_serializable: refactor enum logic (#1204)

Refactor a function into to functions
Simplify the return value
google/json_serializable.dart,google/json_serializable.dart