C
C#•3y ago
Tim

System.Text.Json.Serialize returns emtpy map

Hey! 👋 Any idea, why my System.Text.Json-Serialize returns an empty map? response = new Response(404, "Endpoint not found"); JsonSerializer.Serialize(response) Response-Class: https://haste.devcord.club/tonasutapi.cs
2 Replies
deluvas
deluvas•3y ago
your properties aren't public, therefor JsonSerializer ignores them
Tim
TimOP•3y ago
Ah, thanks
Want results from more Discord servers?
Add your server