mirror of
https://github.com/jackc/pgx.git
synced 2025-05-29 10:42:31 +00:00
Fix encodeJson returning err
This commit is contained in:
parent
c5468f3037
commit
30feade829
@ -1024,7 +1024,7 @@ func decodeJson(vr *ValueReader, d interface{}) error {
|
||||
func encodeJson(w *WriteBuf, value interface{}) error {
|
||||
s, err := json.Marshal(value)
|
||||
if err != nil {
|
||||
fmt.Errorf("Failed to encode json from type: %T", value)
|
||||
return fmt.Errorf("Failed to encode json from type: %T", value)
|
||||
}
|
||||
|
||||
return encodeText(w, s)
|
||||
|
Loading…
x
Reference in New Issue
Block a user