func (b *TodoJSONBuilder) ConvertList(orig []*Todo) (TodoJSONList, error) {
	if orig == nil {
		return nil, nil
	}
	list := make(TodoJSONList, len(orig))
	for idx, or := range orig {
		json, err := b.Convert(or)
		if err != nil {
			return nil, err
		}
		list[idx] = json
	}
	return list, nil
}
ConvertList specified non-JSON slice to JSONList.
package example_appengine
import (
	"encoding/json"
	"time"
)
type TodoJSON struct {
	ID        int64     `json:"id,omitempty,string"`
	Text      string    `json:"text,omitempty" swagger:",req"`
	Done      bool      `json:"done,omitempty"`
	UpdatedAt time.Time `json:"updatedAt,omitempty"`
	CreatedAt time.Time `json:"createdAt,omitempty"`
}
type TodoJSONList []*TodoJSON
type TodoPropertyEncoder func(src *Todo, dest *TodoJSON) error
type TodoPropertyDecoder func(src *TodoJSON, dest *Todo) error
type TodoPropertyInfo struct {
	fieldName string
	jsonName  string
	Encoder   TodoPropertyEncoder
	Decoder   TodoPropertyDecoder
}
func (info *TodoPropertyInfo) FieldName() string {
	return info.fieldName
}
func (info *TodoPropertyInfo) JSONName() string {
	return info.jsonName
}
type TodoJSONBuilder struct {
	_properties        map[string]*TodoPropertyInfo
	_jsonPropertyMap   map[string]*TodoPropertyInfo
	_structPropertyMap map[string]*TodoPropertyInfo
	ID                 *TodoPropertyInfo
	Text               *TodoPropertyInfo
	Done               *TodoPropertyInfo
	UpdatedAt          *TodoPropertyInfo
	CreatedAt          *TodoPropertyInfo
}
func NewTodoJSONBuilder() *TodoJSONBuilder {
	jb := &TodoJSONBuilder{
		_properties:        map[string]*TodoPropertyInfo{},
		_jsonPropertyMap:   map[string]*TodoPropertyInfo{},
		_structPropertyMap: map[string]*TodoPropertyInfo{},
		ID: &TodoPropertyInfo{
			fieldName: "ID",
			jsonName:  "id",
			Encoder: func(src *Todo, dest *TodoJSON) error {
				if src == nil {
					return nil
				}
				dest.ID = src.ID
				return nil
			},
			Decoder: func(src *TodoJSON, dest *Todo) error {
				if src == nil {
					return nil
				}
				dest.ID = src.ID
				return nil
			},
		},
		Text: &TodoPropertyInfo{
			fieldName: "Text",
			jsonName:  "text",
			Encoder: func(src *Todo, dest *TodoJSON) error {
				if src == nil {
					return nil
				}
				dest.Text = src.Text
				return nil
			},
			Decoder: func(src *TodoJSON, dest *Todo) error {
				if src == nil {
					return nil
				}
				dest.Text = src.Text
				return nil
			},
		},
		Done: &TodoPropertyInfo{
			fieldName: "Done",
			jsonName:  "done",
			Encoder: func(src *Todo, dest *TodoJSON) error {
				if src == nil {
					return nil
				}
				dest.Done = src.Done
				return nil
			},
			Decoder: func(src *TodoJSON, dest *Todo) error {
				if src == nil {
					return nil
				}
				dest.Done = src.Done
				return nil
			},
		},
		UpdatedAt: &TodoPropertyInfo{
			fieldName: "UpdatedAt",
			jsonName:  "updatedAt",
			Encoder: func(src *Todo, dest *TodoJSON) error {
				if src == nil {
					return nil
				}
				dest.UpdatedAt = src.UpdatedAt
				return nil
			},
			Decoder: func(src *TodoJSON, dest *Todo) error {
				if src == nil {
					return nil
				}
				dest.UpdatedAt = src.UpdatedAt
				return nil
			},
		},
		CreatedAt: &TodoPropertyInfo{
			fieldName: "CreatedAt",
			jsonName:  "createdAt",
			Encoder: func(src *Todo, dest *TodoJSON) error {
				if src == nil {
					return nil
				}
				dest.CreatedAt = src.CreatedAt
				return nil
			},
			Decoder: func(src *TodoJSON, dest *Todo) error {
				if src == nil {
					return nil
				}
				dest.CreatedAt = src.CreatedAt
				return nil
			},
		},
	}
	jb._structPropertyMap["ID"] = jb.ID
	jb._jsonPropertyMap["id"] = jb.ID
	jb._structPropertyMap["Text"] = jb.Text
	jb._jsonPropertyMap["text"] = jb.Text
	jb._structPropertyMap["Done"] = jb.Done
	jb._jsonPropertyMap["done"] = jb.Done
	jb._structPropertyMap["UpdatedAt"] = jb.UpdatedAt
	jb._jsonPropertyMap["updatedAt"] = jb.UpdatedAt
	jb._structPropertyMap["CreatedAt"] = jb.CreatedAt
	jb._jsonPropertyMap["createdAt"] = jb.CreatedAt
	return jb
}
func (b *TodoJSONBuilder) Properties() []*TodoPropertyInfo {
	return []*TodoPropertyInfo{
		b.ID,
		b.Text,
		b.Done,
		b.UpdatedAt,
		b.CreatedAt,
	}
}
func (b *TodoJSONBuilder) AddAll() *TodoJSONBuilder {
	b._properties["ID"] = b.ID
	b._properties["Text"] = b.Text
	b._properties["Done"] = b.Done
	b._properties["UpdatedAt"] = b.UpdatedAt
	b._properties["CreatedAt"] = b.CreatedAt
	return b
}
func (b *TodoJSONBuilder) Add(infos ...*TodoPropertyInfo) *TodoJSONBuilder {
	for _, info := range infos {
		b._properties[info.fieldName] = info
	}
	return b
}
func (b *TodoJSONBuilder) AddByJSONNames(names ...string) *TodoJSONBuilder {
	for _, name := range names {
		info := b._jsonPropertyMap[name]
		if info == nil {
			continue
		}
		b._properties[info.fieldName] = info
	}
	return b
}
func (b *TodoJSONBuilder) AddByNames(names ...string) *TodoJSONBuilder {
	for _, name := range names {
		info := b._structPropertyMap[name]
		if info == nil {
			continue
		}
		b._properties[info.fieldName] = info
	}
	return b
}
func (b *TodoJSONBuilder) Remove(infos ...*TodoPropertyInfo) *TodoJSONBuilder {
	for _, info := range infos {
		delete(b._properties, info.fieldName)
	}
	return b
}
func (b *TodoJSONBuilder) RemoveByJSONNames(names ...string) *TodoJSONBuilder {
	for _, name := range names {
		info := b._jsonPropertyMap[name]
		if info == nil {
			continue
		}
		delete(b._properties, info.fieldName)
	}
	return b
}
func (b *TodoJSONBuilder) RemoveByNames(names ...string) *TodoJSONBuilder {
	for _, name := range names {
		info := b._structPropertyMap[name]
		if info == nil {
			continue
		}
		delete(b._properties, info.fieldName)
	}
	return b
}
func (b *TodoJSONBuilder) Convert(orig *Todo) (*TodoJSON, error) {
	if orig == nil {
		return nil, nil
	}
	ret := &TodoJSON{}
	for _, info := range b._properties {
		if err := info.Encoder(orig, ret); err != nil {
			return nil, err
		}
	}
	return ret, nil
}