I want to store a certain struct into my database that has a JSON field within it.
type Comp struct {
CompId int64 `db:\"comp_id\" js
from the go documentation:
json.RawMessage is a raw encoded JSON object. It implements Marshaler and Unmarshaler and can be used to delay JSON decoding or precompute a JSON encoding.
if you log.Printf("%#", colors) in the example provided at package json json.RawMessage you can see that after unmarshalling the json object 'Point'-member isn't unmarshalled but left in []byte format until the color-format is fixed and 'Point' is unmarshalled explicitly.
Did you try something like unmarshal WeeklySchedule before putting it into the DB?