diff --git a/comid/classid.go b/comid/classid.go index feb375e9..d08dcde6 100644 --- a/comid/classid.go +++ b/comid/classid.go @@ -293,8 +293,8 @@ func (o TaggedImplID) Bytes() []byte { return o[:] } -func (o *TaggedImplID) MarshalJSON() ([]byte, error) { - return json.Marshal((*o)[:]) +func (o TaggedImplID) MarshalJSON() ([]byte, error) { + return json.Marshal((o)[:]) } func (o *TaggedImplID) UnmarshalJSON(data []byte) error { diff --git a/comid/entity.go b/comid/entity.go index 911c2111..c41c4f8d 100644 --- a/comid/entity.go +++ b/comid/entity.go @@ -90,7 +90,7 @@ func (o *Entity) UnmarshalCBOR(data []byte) error { } // MarshalCBOR serializes to CBOR -func (o *Entity) MarshalCBOR() ([]byte, error) { +func (o Entity) MarshalCBOR() ([]byte, error) { return encoding.SerializeStructToCBOR(em, o) } @@ -100,7 +100,7 @@ func (o *Entity) UnmarshalJSON(data []byte) error { } // MarshalJSON serializes to JSON -func (o *Entity) MarshalJSON() ([]byte, error) { +func (o Entity) MarshalJSON() ([]byte, error) { return encoding.SerializeStructToJSON(o) } diff --git a/comid/flagsmap.go b/comid/flagsmap.go index 94ed3e35..acbe3727 100644 --- a/comid/flagsmap.go +++ b/comid/flagsmap.go @@ -197,7 +197,7 @@ func (o *FlagsMap) UnmarshalCBOR(data []byte) error { } // MarshalCBOR serializes to CBOR -func (o *FlagsMap) MarshalCBOR() ([]byte, error) { +func (o FlagsMap) MarshalCBOR() ([]byte, error) { return encoding.SerializeStructToCBOR(em, o) } @@ -207,7 +207,7 @@ func (o *FlagsMap) UnmarshalJSON(data []byte) error { } // MarshalJSON serializes to JSON -func (o *FlagsMap) MarshalJSON() ([]byte, error) { +func (o FlagsMap) MarshalJSON() ([]byte, error) { return encoding.SerializeStructToJSON(o) } diff --git a/comid/measurement.go b/comid/measurement.go index 52fac579..c3150a08 100644 --- a/comid/measurement.go +++ b/comid/measurement.go @@ -374,7 +374,7 @@ func (o *Mval) UnmarshalCBOR(data []byte) error { } // MarshalCBOR serializes to CBOR -func (o *Mval) MarshalCBOR() ([]byte, error) { +func (o Mval) MarshalCBOR() ([]byte, error) { return encoding.SerializeStructToCBOR(em, o) } @@ -384,7 +384,7 @@ func (o *Mval) UnmarshalJSON(data []byte) error { } // MarshalJSON serializes to JSON -func (o *Mval) MarshalJSON() ([]byte, error) { +func (o Mval) MarshalJSON() ([]byte, error) { return encoding.SerializeStructToJSON(o) } diff --git a/comid/triples.go b/comid/triples.go index e3e9ac90..66164541 100644 --- a/comid/triples.go +++ b/comid/triples.go @@ -35,7 +35,7 @@ func (o *Triples) UnmarshalCBOR(data []byte) error { } // MarshalCBOR serializes to CBOR -func (o *Triples) MarshalCBOR() ([]byte, error) { +func (o Triples) MarshalCBOR() ([]byte, error) { return encoding.SerializeStructToCBOR(em, o) } @@ -45,7 +45,7 @@ func (o *Triples) UnmarshalJSON(data []byte) error { } // MarshalJSON serializes to JSON -func (o *Triples) MarshalJSON() ([]byte, error) { +func (o Triples) MarshalJSON() ([]byte, error) { return encoding.SerializeStructToJSON(o) } diff --git a/corim/entity.go b/corim/entity.go index 8a3169ac..f322ace1 100644 --- a/corim/entity.go +++ b/corim/entity.go @@ -103,7 +103,7 @@ func (o *Entity) UnmarshalCBOR(data []byte) error { } // MarshalCBOR serializes to CBOR -func (o *Entity) MarshalCBOR() ([]byte, error) { +func (o Entity) MarshalCBOR() ([]byte, error) { return encoding.SerializeStructToCBOR(em, o) } @@ -113,7 +113,7 @@ func (o *Entity) UnmarshalJSON(data []byte) error { } // MarshalJSON serializes to JSON -func (o *Entity) MarshalJSON() ([]byte, error) { +func (o Entity) MarshalJSON() ([]byte, error) { return encoding.SerializeStructToJSON(o) } diff --git a/corim/meta.go b/corim/meta.go index 9ce834e5..902c04c6 100644 --- a/corim/meta.go +++ b/corim/meta.go @@ -84,7 +84,7 @@ func (o *Signer) UnmarshalCBOR(data []byte) error { } // MarshalCBOR serializes to CBOR -func (o *Signer) MarshalCBOR() ([]byte, error) { +func (o Signer) MarshalCBOR() ([]byte, error) { return encoding.SerializeStructToCBOR(em, o) } @@ -94,7 +94,7 @@ func (o *Signer) UnmarshalJSON(data []byte) error { } // MarshalJSON serializes to JSON -func (o *Signer) MarshalJSON() ([]byte, error) { +func (o Signer) MarshalJSON() ([]byte, error) { return encoding.SerializeStructToJSON(o) }