Skip to content

Commit

Permalink
Add some missing information to the `Advanced Use Cases/ApplicationSp…
Browse files Browse the repository at this point in the history
…ecificMessagePackExtensionTypes` snippet.
  • Loading branch information
fumoboy007 committed Jun 23, 2024
1 parent a3f5bbd commit 276bde4
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,11 @@ struct MyExtensionType: CodableAsMessagePackExtension {
// Decode the value from the given bytes.
}
}

// snippet.hide
var decoder = MessagePackDecoder()
// snippet.show
// Register the type with the decoder before deserializing a message.
decoder.applicationSpecificExtensionTypes = [
MyExtensionType.self
]

0 comments on commit 276bde4

Please sign in to comment.