Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Json Data Annotations #5667

Closed
Julien-Marpault opened this issue Dec 6, 2018 · 1 comment
Closed

Json Data Annotations #5667

Julien-Marpault opened this issue Dec 6, 2018 · 1 comment
Labels
area-blazor Includes: Blazor, Razor Components

Comments

@Julien-Marpault
Copy link

Maybe I didn't find the correct method, but I faced an issue using Dtos.

I'm doing some application with a backent and a frontend sharing the same dtos in a separate dll.

I used to do like this

[JsonProperty("qnaList")] public List<KBEntry> Entries { get; set; } = new List<KBEntry>();

but it seems Blazor doesn't support NewtonSoft Data Annottions.

What could be the good solution for that problem if there's one right now.

Thanks.

@Andrzej-W
Copy link

JSON implementation in Blazor is now rather basic. You have 3 choices:

.NET Core will have a new Json implementation and hopefully it will be compatible with Blazor running on Mono some day.
https://blogs.msdn.microsoft.com/dotnet/2018/12/04/announcing-net-core-3-preview-1-and-open-sourcing-windows-desktop-frameworks/#user-content-introducing-a-fast-in-box-json-reader

@aspnet-hello aspnet-hello transferred this issue from dotnet/blazor Dec 17, 2018
@aspnet-hello aspnet-hello added area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates area-blazor Includes: Blazor, Razor Components labels Dec 17, 2018
@mkArtakMSFT mkArtakMSFT removed area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates labels May 9, 2019
@dotnet dotnet locked as resolved and limited conversation to collaborators Dec 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Includes: Blazor, Razor Components
Projects
None yet
Development

No branches or pull requests

4 participants