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