func (e *Encoder) Map(t protocol.Target, k string, meta protocol.Metadata) protocol.MapEncoder {
	temp := newScope(e.encoder, &e.encoder)
	return &mapEncoder{temp, k}
}
Map will return a new mapEncoder and create a new scope for the map encoding.
package json
import (
	"bytes"
	"fmt"
	"io"
	"github.com/aws/aws-sdk-go-v2/private/protocol"
)
type Encoder struct {
	encoder
	root bool
}
func NewEncoder() *Encoder {
	buf := bytes.NewBuffer([]byte{'{'})
	e := &Encoder{
		encoder: encoder{
			buf:      buf,
			parent:   nil,
			fieldBuf: &protocol.FieldBuffer{},
		},
		root: true,
	}
	return e
}
func (e *Encoder) Encode() (io.ReadSeeker, error) {
	b, err := e.encode()
	if err != nil {
		return nil, err
	}
	if len(b) == 2 {
		return nil, nil
	}
	return bytes.NewReader(b), nil
}
func (e *Encoder) SetValue(t protocol.Target, k string, v protocol.ValueMarshaler, meta protocol.Metadata) {
	e.encoder.writeSep()
	e.writeKey(k)
	e.writeValue(v)
}
func (e *Encoder) SetStream(t protocol.Target, k string, v protocol.StreamMarshaler, meta protocol.Metadata) {
	if e.err != nil {
		return
	}
	e.err = fmt.Errorf("json encoder SetStream not supported, %s, %s", t, k)
}