Skip to content

Commit 90791b1

Browse files
Immo Landwerthpull[bot]
authored andcommitted
Add line that positions NrbfDecoder as the equivalent of JSON/XML reader (#42108)
1 parent d43b55a commit 90791b1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/standard/serialization/binaryformatter-migration-guide/read-nrbf-payloads.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ helpviewer_keywords:
1818

1919
As part of .NET 9, a new [NrbfDecoder] class was introduced to decode NRBF payloads without performing _deserialization_ of the payload. This API can safely be used to decode trusted or untrusted payloads without any of the risks that [BinaryFormatter] deserialization carries. However, [NrbfDecoder] merely decodes the data into structures an application can further process. Care must be taken when using [NrbfDecoder] to safely load the data into the appropriate instances.
2020

21+
You can think of <xref:System.Formats.Nrbf.NrbfDecoder> as being the equivalent of using a JSON/XML reader without the deserializer.
22+
2123
## NrbfDecoder
2224

2325
[NrbfDecoder] is part of the new [System.Formats.Nrbf](https://www.nuget.org/packages/System.Formats.Nrbf) NuGet package. It targets not only .NET 9, but also older monikers like .NET Standard 2.0 and .NET Framework. That multi-targeting makes it possible for everyone who uses a supported version of .NET to migrate away from [BinaryFormatter]. [NrbfDecoder] can read payloads that were serialized with [BinaryFormatter] using <xref:System.Runtime.Serialization.Formatters.FormatterTypeStyle.TypesAlways?displayProperty=nameWithType> (the default).

0 commit comments

Comments
 (0)