浏览代码

bumped up System.Text.Json version to 6.0.7

Vicente Penades 2 年之前
父节点
当前提交
f0ac49ffe9

+ 4 - 0
src/SharpGLTF.Core/IO/JsonContent.Impl.cs

@@ -39,7 +39,9 @@ namespace SharpGLTF.IO
                 };
                 };
             }
             }
 
 
+            #pragma warning disable IL2026 // Members annotated with 'RequiresUnreferencedCodeAttribute' require dynamic access otherwise can break functionality when trimming application code
             return JsonSerializer.Serialize(obj, obj.GetType(), options);
             return JsonSerializer.Serialize(obj, obj.GetType(), options);
+            #pragma warning restore IL2026 // Members annotated with 'RequiresUnreferencedCodeAttribute' require dynamic access otherwise can break functionality when trimming application code
         }
         }
 
 
         /// <summary>
         /// <summary>
@@ -74,7 +76,9 @@ namespace SharpGLTF.IO
 
 
             var json = ToJson(obj, options);
             var json = ToJson(obj, options);
 
 
+            #pragma warning disable IL2026 // Members annotated with 'RequiresUnreferencedCodeAttribute' require dynamic access otherwise can break functionality when trimming application code
             return JsonSerializer.Deserialize(json, type, options);
             return JsonSerializer.Deserialize(json, type, options);
+            #pragma warning restore IL2026 // Members annotated with 'RequiresUnreferencedCodeAttribute' require dynamic access otherwise can break functionality when trimming application code
         }
         }
 
 
         public static Object Deserialize(JSONELEMENT element)
         public static Object Deserialize(JSONELEMENT element)

+ 2 - 0
src/SharpGLTF.Core/IO/JsonContent.cs

@@ -153,7 +153,9 @@ namespace SharpGLTF.IO
                 };
                 };
             }
             }
 
 
+            #pragma warning disable IL2026 // Members annotated with 'RequiresUnreferencedCodeAttribute' require dynamic access otherwise can break functionality when trimming application code
             var json = JsonSerializer.Serialize(value, value.GetType(), options);
             var json = JsonSerializer.Serialize(value, value.GetType(), options);
+            #pragma warning restore IL2026 // Members annotated with 'RequiresUnreferencedCodeAttribute' require dynamic access otherwise can break functionality when trimming application code
 
 
             return Parse(json);
             return Parse(json);
         }
         }

+ 1 - 1
src/SharpGLTF.Core/SharpGLTF.Core.csproj

@@ -18,7 +18,7 @@
   </ItemGroup>  
   </ItemGroup>  
   
   
   <ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFramework)' == 'netstandard2.1'">    
   <ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' OR '$(TargetFramework)' == 'netstandard2.1'">    
-    <PackageReference Include="System.Text.Json" Version="5.0.2" />
+    <PackageReference Include="System.Text.Json" Version="6.0.7" />
   </ItemGroup>
   </ItemGroup>
 
 
   <ItemGroup>
   <ItemGroup>