forked from xamarin/xamarin-macios
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[dotnet] Enable the reflection-based json serializer by default. Fixes …
…xamarin#18057. Fixes xamarin#18057.
1 parent
c1f56a0
commit 09d494f
Showing
3 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using System; | ||
using System.Text.Json; | ||
|
||
using NUnit.Framework; | ||
|
||
#nullable enable | ||
|
||
namespace MonoTouchFixtures.System.Text.Json { | ||
[TestFixture] | ||
[Preserve (AllMembers = true)] | ||
public partial class SerializationTest { | ||
[Test] | ||
public void Serialize () | ||
{ | ||
var txt = JsonSerializer.Serialize (42); | ||
Console.WriteLine (txt); | ||
Assert.AreEqual ("?", txt, "serialized blob"); | ||
} | ||
} | ||
} |