// Convert specified JSONList to non-JSON slice.
553566
func (jsonList SampleJSONList) Convert() ([]*Sample, error) {
	orig := ([]*SampleJSON)(jsonList)

	list := make([]*Sample, len(orig))
	for idx, or := range orig {
		obj, err := or.Convert()
		if err != nil {
			return nil, err
		}
		list[idx] = obj
	}

	return list, nil
}
1064101
func Convert_core_ServiceList_To_v1_ServiceList(in *core.ServiceList, out *v1.ServiceList, s conversion.Scope) error {
	return autoConvert_core_ServiceList_To_v1_ServiceList(in, out, s)
}
1156333
func (b *FugaJSONBuilder) ConvertList(orig []*Fuga) (FugaJSONList, error) {
	if orig == nil {
		return nil, nil
	}

	list := make(FugaJSONList, len(orig))
	for idx, or := range orig {
		json, err := b.Convert(or)
		if err != nil {
			return nil, err
		}
		list[idx] = json
	}

	return list, nil
}
235279
func JSONEncode(value interface{}) ([]byte, uint32, error) {
	var bytes []byte
	flags := gocbcore.EncodeCommonFlags(gocbcore.JsonType, gocbcore.NoCompression)
	var err error

	switch typeValue := value.(type) {
	case []byte:
		bytes = typeValue
	case *[]byte:
		bytes = *typeValue
	case *interface{}:
		return JSONEncode(*typeValue)
	default:
		bytes, err = json.Marshal(value)
		if err != nil {
			return nil, 0, err
		}
	}

	// No compression supported currently

	return bytes, flags, nil
}
741579
func (jsonList PeopleJSONList) Convert() ([]*People, error) {
	orig := ([]*PeopleJSON)(jsonList)

	list := make([]*People, len(orig))
	for idx, or := range orig {
		obj, err := or.Convert()
		if err != nil {
			return nil, err
		}
		list[idx] = obj
	}

	return list, nil
}
334498
func Convert_v1_TemplateList_To_template_TemplateList(in *v1.TemplateList, out *template.TemplateList, s conversion.Scope) error {
	return autoConvert_v1_TemplateList_To_template_TemplateList(in, out, s)
}
301296
func (o *UlimitOpt) GetList() []*units.Ulimit {
	var ulimits []*units.Ulimit
	for _, v := range *o.values {
		ulimits = append(ulimits, v)
	}

	return ulimits
}
1268404
func MakeJsonList(b []byte) []byte {
	if !bytes.HasPrefix(b, []byte{'['}) {
		b = append([]byte{'['}, b...)
		b = append(b, ']')
	}
	return b
}
883480
func FormatStringList(list []string) (fields []interface{}) {
	fields = make([]interface{}, len(list))
	for i, v := range list {
		fields[i] = v
	}
	return
}
59565
func ParseStringList(f interface{}) ([]string, error) {
	fields, ok := f.([]interface{})
	if !ok {
		return nil, newParseError("expected a string list, got a non-list")
	}

	list := make([]string, len(fields))
	for i, f := range fields {
		var err error
		if list[i], err = ParseString(f); err != nil {
			return nil, newParseError("cannot parse string in string list: " + err.Error())
		}
	}
	return list, nil
}
981391
func (jsonList PersonJSONList) Convert() ([]*Person, error) {
	orig := ([]*PersonJSON)(jsonList)

	list := make([]*Person, len(orig))
	for idx, or := range orig {
		obj, err := or.Convert()
		if err != nil {
			return nil, err
		}
		list[idx] = obj
	}

	return list, nil
}
1354007
func convertSliceNumbers(s []interface{}) error {
	var err error
	for i, v := range s {
		switch v := v.(type) {
		case json.Number:
			s[i], err = convertNumber(v)
		case map[string]interface{}:
			err = convertMapNumbers(v)
		case []interface{}:
			err = convertSliceNumbers(v)
		}
		if err != nil {
			return err
		}
	}
	return nil
}
248414
func (d *Context) JsonEncode(index int) string {
	if s := C.duk_json_encode(d.duk_context, C.duk_idx_t(index)); s != nil {
		return C.GoString(s)
	}
	return ""
}
304534
func ConvertServicesToPortList(services []Service) string {

	portlist := ""
	for _, s := range services {
		portlist = portlist + s.Ports.String() + ","
	}

	if len(portlist) == 0 {
		portlist = "0"
	} else {
		portlist = portlist[:len(portlist)-1]
	}

	return portlist
}
896463
func (p *Parser) parseStringList() ([]string, error) {
	// Parse first (required) string.
	str, err := p.parseString()
	if err != nil {
		return nil, err
	}
	strs := []string{str}

	// Parse remaining (optional) strings.
	for {
		if tok, _, _ := p.ScanIgnoreWhitespace(); tok != COMMA {
			p.Unscan()
			return strs, nil
		}

		if str, err = p.parseString(); err != nil {
			return nil, err
		}

		strs = append(strs, str)
	}
}
1043292
func ConvertJSONToMetaValues(reader io.Reader, metaors []Metaor) (*MetaValues, error) {
	var (
		err     error
		values  = map[string]interface{}{}
		decoder = json.NewDecoder(reader)
	)

	if err = decoder.Decode(&values); err == nil {
		return convertMapToMetaValues(values, metaors)
	}
	return nil, err
}
135069
func (c *namespaces) List(opts api.ListOptions) (result *api.NamespaceList, err error) {
	result = &api.NamespaceList{}
	err = c.client.Get().
		Resource("namespaces").
		VersionedParams(&opts, api.ParameterCodec).
		Do().
		Into(result)
	return
}