We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d9c3f40 commit f9416acCopy full SHA for f9416ac
1 file changed
crosssigning.go
@@ -52,6 +52,13 @@ type CrossSigningForKeyOrDevice struct {
52
CrossSigningBody
53
}
54
55
+// Implements json.Marshaler
56
+func (c CrossSigningForKeyOrDevice) MarshalJSON() ([]byte, error) {
57
+ // Marshal the contents at the top level, rather than having it embedded
58
+ // in a "CrossSigningBody" JSON key.
59
+ return json.Marshal(c.CrossSigningBody)
60
+}
61
+
62
// Implements json.Unmarshaler
63
func (c *CrossSigningForKeyOrDevice) UnmarshalJSON(b []byte) error {
64
if gjson.GetBytes(b, "device_id").Exists() {
0 commit comments