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