()
| 55 | } |
| 56 | |
| 57 | func (update WaveObjUpdate) MarshalJSON() ([]byte, error) { |
| 58 | rtn := make(map[string]any) |
| 59 | rtn["updatetype"] = update.UpdateType |
| 60 | rtn["otype"] = update.OType |
| 61 | rtn["oid"] = update.OID |
| 62 | if update.Obj != nil { |
| 63 | var err error |
| 64 | rtn["obj"], err = ToJsonMap(update.Obj) |
| 65 | if err != nil { |
| 66 | return nil, err |
| 67 | } |
| 68 | } |
| 69 | return json.Marshal(rtn) |
| 70 | } |
| 71 | |
| 72 | func MakeUpdate(obj WaveObj) WaveObjUpdate { |
| 73 | return WaveObjUpdate{ |
nothing calls this directly
no test coverage detected