tursodatabase / libsql-client-go

Go client API for libSQL
MIT License
166 stars 23 forks source link

Support Marshal/Unmarshal JSON Byte Slice - HTTP driver #40

Open sahidrahman404 opened 1 year ago

sahidrahman404 commented 1 year ago

Currently If you use the HTTP driver, you will get this error if you try to marshal a struct field to JSON byte slice or unmarshal JSON byte slice into a struct field. The error looks like this

sql: Scan error on column index 9, name \"genres\": unsupported Scan, storing driver.Value type map[string]interface {} into type *[]uint8

You won't get the above error if you use the WS driver