You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This will choke if you try to validate object types, however, because codec deserializes CBOR to map[interface{}]interface{}. many deserializers need to map to interface{} keys. Supporting this would be a step in the right direction for validating on go types.
The text was updated successfully, but these errors were encountered:
@dolmen as with the other issue, there's a bit more internals that rely on json specific stuff which prohibits these usecases. While that method takes an interface as a type abstraction, it definitely insists on very clean json serialization.
In the above case, this we would need to adapt many if not all keywords with custom marshaling logic to correctly (de)serialize the keys as well.
If we supported all values this package maps to, we can validate CBOR data without first passing through JSON. Here's an example that works right now:
https://play.golang.org/p/kpCThgKoV_x
This will choke if you try to validate object types, however, because
codec
deserializes CBOR tomap[interface{}]interface{}
. many deserializers need to map tointerface{}
keys. Supporting this would be a step in the right direction for validating on go types.The text was updated successfully, but these errors were encountered: