Skip to content

Commit 7302bdf

Browse files
committed
Update null reference handling
1 parent 1163dbf commit 7302bdf

File tree

15 files changed

+3
-3
lines changed

15 files changed

+3
-3
lines changed

NetJSON/NetJSON.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3269,7 +3269,7 @@ internal static NetJSONSerializer<T> GetSerializer<T>() {
32693269
public static string Serialize(Type type, object value) {
32703270
if (value == null)
32713271
{
3272-
return null;
3272+
return NullStr;
32733273
}
32743274

32753275
return _serializeWithTypes.GetOrAdd(type, _ => {
@@ -3310,7 +3310,7 @@ public static string Serialize(Type type, object value, NetJSONSettings settings
33103310
{
33113311
if (value == null)
33123312
{
3313-
return null;
3313+
return NullStr;
33143314
}
33153315

33163316
return _serializeWithTypesSettings.GetOrAdd(type, _ => {
@@ -3596,7 +3596,7 @@ public static string SerializeObject(object value, NetJSONSettings settings)
35963596
{
35973597
if (value == null)
35983598
{
3599-
return "null";
3599+
return NullStr;
36003600
}
36013601

36023602
return Serialize(value.GetType(), value, settings);

NetJSON/lib/net5.0/NetJSON.dll

0 Bytes
Binary file not shown.

NetJSON/lib/net5.0/NetJSON.pdb

-4 Bytes
Binary file not shown.

NetJSON/lib/net6.0/NetJSON.dll

0 Bytes
Binary file not shown.

NetJSON/lib/net6.0/NetJSON.pdb

0 Bytes
Binary file not shown.

NetJSON/lib/net7.0/NetJSON.dll

0 Bytes
Binary file not shown.

NetJSON/lib/net7.0/NetJSON.pdb

0 Bytes
Binary file not shown.

NetJSON/lib/net8.0/NetJSON.dll

0 Bytes
Binary file not shown.

NetJSON/lib/net8.0/NetJSON.pdb

-4 Bytes
Binary file not shown.

NetJSON/lib/net9.0/NetJSON.dll

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)