(buf []byte, dir encoding.Direction)
| 2074 | } |
| 2075 | |
| 2076 | func (j jsonArray) EncodeForwardIndex(buf []byte, dir encoding.Direction) ([]byte, error) { |
| 2077 | buf = encoding.EncodeJSONArrayKeyMarker(buf, dir, int64(len(j))) |
| 2078 | buf = encoding.EncodeJSONValueLength(buf, dir, int64(len(j))) |
| 2079 | |
| 2080 | var err error |
| 2081 | for _, a := range j { |
| 2082 | buf, err = a.EncodeForwardIndex(buf, dir) |
| 2083 | if err != nil { |
| 2084 | return nil, err |
| 2085 | } |
| 2086 | } |
| 2087 | buf = encoding.EncodeJSONKeyTerminator(buf, dir) |
| 2088 | return buf, nil |
| 2089 | } |
| 2090 | |
| 2091 | func (j jsonObject) EncodeForwardIndex(buf []byte, dir encoding.Direction) ([]byte, error) { |
| 2092 | buf = encoding.EncodeJSONObjectKeyMarker(buf, dir) |
nothing calls this directly
no test coverage detected