(appendTo []byte)
| 79 | } |
| 80 | |
| 81 | func (j jsonNumber) encode(appendTo []byte) (e jEntry, b []byte, err error) { |
| 82 | decOffset := len(appendTo) |
| 83 | dec := apd.Decimal(j) |
| 84 | appendTo = encoding.EncodeUntaggedDecimalValue(appendTo, &dec) |
| 85 | lengthInBytes := len(appendTo) - decOffset |
| 86 | if err := checkLength(lengthInBytes); err != nil { |
| 87 | return jEntry{}, b, err |
| 88 | } |
| 89 | return makeNumberJEntry(lengthInBytes), appendTo, nil |
| 90 | } |
| 91 | |
| 92 | // encodingModeForIdx determines which encoding mode we choose to use for a |
| 93 | // given i-th entry in an array or object. |
nothing calls this directly
no test coverage detected