Skip to content

Commit

Permalink
Load json.RawMessage as raw bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
Jille committed Jan 3, 2024
1 parent 612dde9 commit aa73651
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mysqltsv.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package mysqltsv
import (
"bufio"
"database/sql/driver"
"encoding/json"
"fmt"
"io"
"strconv"
Expand Down Expand Up @@ -167,6 +168,8 @@ func valueToBytes(v any, cfg *EncoderOptions) ([]byte, error) {
return []byte(v), nil
case []byte:
return v, nil
case json.RawMessage:
return v, nil
case uint8:
return []byte(strconv.FormatUint(uint64(v), 10)), nil
case int8:
Expand Down

0 comments on commit aa73651

Please sign in to comment.