122
Console.WriteLine($"JSON con Array anidado: Usuario: {Jitem.GetProperty("usuario")} | Contraseña: {Jitem.GetProperty("contrasena")}");
1
using System;
2
using System.IO;
3
using System.Text;
4
using System.Text.Json;
5
6
public class Program
7
{
8
static void Main(string[] args) {
9
Console.WriteLine("Hello JSON!");
10
11
JSONSimple(); //Crea un JSON simple
12
13
JSONAnidado(); // Crea un JSON con un objeto anidado
14
15
JSONArrayAnidado(); // Crea un JSON con un array anidado de objetos
16
17
LeerJSONSimple(); // Lee el JSON Simple
18
19
LeerJSONAnidado(); //Lee el JSON con objeto anidado
20
21
LeerJSONAnidadoWArray(); //Lee el JSON con array anidado
22
}
23
static void JSONSimple() {
24
JsonWriterOptions jsonWOpt = new JsonWriterOptions {
Cached Result
>