MarshalJSON implements JSON.Marshaler interface.
()
| 573 | |
| 574 | // MarshalJSON implements JSON.Marshaler interface. |
| 575 | func (v Version) MarshalJSON() ([]byte, error) { |
| 576 | return json.Marshal(v.String()) |
| 577 | } |
| 578 | |
| 579 | // UnmarshalText implements the encoding.TextUnmarshaler interface. |
| 580 | func (v *Version) UnmarshalText(text []byte) error { |