code: func (n *NodeState) UnmarshalJSON(data []byte) error {
  	s := string(data)
  	switch s {
  	case "0", `"NodeNotReady"`:
  		*n = NodeNotReady
  	case "1", `"NodeReady"`:
  		*n = NodeReady
  	case "2", `"NodeUnreachable"`:
  		*n = NodeUnreachable
  	default:
  		return fmt.Errorf("unrecognized NodeState %q", s)
  	}
  	return nil
  }
docs: // UnmarshalJSON supports unmarshalling according to the older
  // integer based, as well as the new string based, representation