JSON in C#
Convertire i dati JSON nella definizione del tipo C#
JSON in C#
Il tuo codice C#
using System;
using System.Text.Json;
public record Root(
[property: JsonPropertyName("a")]
string A,
[property: JsonPropertyName("arr")]
int[] Arr,
[property: JsonPropertyName("nested")]
Nested Nested
);
public record Nested(
[property: JsonPropertyName("a")]
int A,
[property: JsonPropertyName("b")]
string B
);