1
0
Fork 0
mirror of https://github.com/Luzifer/sii.git synced 2024-12-21 08:21:16 +00:00

Add RawValue

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2019-11-06 15:59:49 +01:00
parent a9607ba090
commit c3612d8a19
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

View file

@ -105,3 +105,18 @@ func (p *Ptr) UnmarshalSII(in []byte) error {
} }
// resource_tie => native type string // resource_tie => native type string
// RawValue is used in places where a key can has multiple types and
// clean parsing into Go types is no longer possible. Sadly even parsing
// into interface{} is not possible as even for that the type of the value
// must be known
type RawValue []byte
func (r RawValue) MarshalSII() ([]byte, error) { return r, nil }
func (r *RawValue) UnmarshalSII(in []byte) error {
*r = in
return nil
}
// TODO: Add converter functions from / to RawValue