You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
Unhandled exception rendering component: Serialization and deserialization of 'System.Type' instances are not supported and should be avoided since they can lead to security issues. Path: $.Inputs.Parent.ShapeDefiner.Method.ReturnParameter.Member.DeclaringType.
System.NotSupportedException: Serialization and deserialization of 'System.Type' instances are not supported and should be avoided since they can lead to security issues. Path: $.Inputs.Parent.ShapeDefiner.Method.ReturnParameter.Member.DeclaringType.
All you need to do to reproduce this error is to create empty instance of Diagram inside webassembly project component and then just try to serialize it with System.Text.Json. Is kind of an issue as I want to be able to pass my custom diagram to the server side safely.
The text was updated successfully, but these errors were encountered:
You will have a lot of issues if you try to serialize the diagram directly, as It contains Types and many loops. Currently, there is still no built-in way to serialize a diagram in the library, I'm still thinking about a good solution and will probably just settle on Json at first as it's the most used.
A possible solution that you can use is to represent the diagram the way your backend needs, for example create anonymous objects for the diagram, the list of nodes and links, and serialize that instead. By doing so, you can choose exactly what to ignore/export. This is what I'm doing in my apps and it's what everyone should do, since serializing the full diagram isn't always the best idea.
When I try to serialize Diagram I get.
All you need to do to reproduce this error is to create empty instance of Diagram inside webassembly project component and then just try to serialize it with System.Text.Json. Is kind of an issue as I want to be able to pass my custom diagram to the server side safely.
The text was updated successfully, but these errors were encountered: