code: func parseUnion(ctx *context, unionNode *jsongo.JSONNode) (*Union, error) {
  	if unionNode.Len() == 0 || unionNode.At(0).GetType() != jsongo.TypeValue {
  		return nil, errors.New("invalid JSON for union specified")
  	}
  
  	unionName, ok := unionNode.At(0).Get().(string)
  	if !ok {
  		return nil, fmt.Errorf("union name is %T, not a string", unionNode.At(0).Get())
  	}
  	unionCRC, ok := unionNode.At(unionNode.Len() - 1).At(crcField).Get().(string)
  	if !ok {
  		return nil, fmt.Errorf("union crc invalid or missing")
  	}
  
  	union := Union{
  		Name: unionName,
  		CRC:  unionCRC,
  	}
  
  	// loop through union fields, skip first (name) and last (crc)
  	for j := 1; j < unionNode.Len()-1; j++ {
  		if unionNode.At(j).GetType() == jsongo.TypeArray {
  			fieldNode := unionNode.At(j)
  
  			field, err := parseField(ctx, fieldNode)
  			if err != nil {
  				return nil, err
  			}
  
  			union.Fields = append(union.Fields, *field)
  		}
  	}
  
  	return &union, nil
  }
docs: // parseUnion parses VPP binary API union object from JSON node