(appendTo []byte)
| 59 | } |
| 60 | |
| 61 | func (j jsonNumber) encode(appendTo []byte) (e jEntry, b []byte, err error) { |
| 62 | decOffset := len(appendTo) |
| 63 | dec := apd.Decimal(j) |
| 64 | appendTo = encoding.EncodeUntaggedDecimalValue(appendTo, &dec) |
| 65 | lengthInBytes := len(appendTo) - decOffset |
| 66 | if err := checkLength(lengthInBytes); err != nil { |
| 67 | return jEntry{}, b, err |
| 68 | } |
| 69 | return makeNumberJEntry(lengthInBytes), appendTo, nil |
| 70 | } |
| 71 | |
| 72 | // encodingModeForIdx determines which encoding mode we choose to use for a |
| 73 | // given i-th entry in an array or object. |
nothing calls this directly
no test coverage detected