add codec.RawMessage support
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
5e9461f34d
commit
cf9b8790a5
@ -153,6 +153,10 @@ func (c *jsonpbCodecV2) Marshal(d []byte, v interface{}, opts ...codec.Option) (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return marshalOptions.MarshalAppend(d[:0], m)
|
return marshalOptions.MarshalAppend(d[:0], m)
|
||||||
|
case codec.RawMessage:
|
||||||
|
return []byte(m), nil
|
||||||
|
case *codec.RawMessage:
|
||||||
|
return []byte(*m), nil
|
||||||
default:
|
default:
|
||||||
return nil, codec.ErrInvalidMessage
|
return nil, codec.ErrInvalidMessage
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user