Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.9.2
-
None
Description
This will make JSON encoder/decoders use string representation instead of meaningless numbers.
The new generated code will looks like:
func (p TestEnum) MarshalText() ([]byte, error) { return []byte(p.String()), nil } func (p *TestEnum) UnmarshalText(text []byte) error { x, err := TestEnumFromString(string(text)) *p = x return err }