exchange object models between Blazor server and Blazor WebAssembly #53293
Unanswered
SchlickerW
asked this question in
Q&A
Replies: 2 comments
-
I think you can use Newtonsoft.Json, |
Beta Was this translation helpful? Give feedback.
0 replies
-
Yes you are right. In meantime I've used NewtonSoft.Json by creating my own Deserializer to deserialie the base and all derived classes. It works for me as expected now. Thinking about using OSLC4NET for more complex models since OSLC is intended to be used for model exchange. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
What is the best way to exchange an object model (e.g. using parent/child nodes, links between nodes and inheritance of different node types) using REST API implemented by Blazor server and REST client by Blazor Webassembly?
I'm using .NET 5 with EF5 and SQL server database to persist the model. Now I want to render the model in HTML view using Blazor WebAssembly with SyncFusion library.
Problem is to serialize/deserialize the object model in JSON format. I use Json.NET with custom JsonConverter to serialize the object model on server side, but deserializing it on client side with System.Text.Json doesn't work since no JsonConverter is available there.
Thinking about OSLC.NET? Any suggestions?
Best regards
Wolfgang
Beta Was this translation helpful? Give feedback.
All reactions