Skip to content

Instantly share code, notes, and snippets.

@renatogroffe
Created November 21, 2022 14:51
Show Gist options
  • Save renatogroffe/80109790cf74cec08403c8b0067e2799 to your computer and use it in GitHub Desktop.
Save renatogroffe/80109790cf74cec08403c8b0067e2799 to your computer and use it in GitHub Desktop.
using ExemploRawStringLiterals.Models;
using System.Text.Json;
namespace ExemploRawStringLiterals;
public static class Teste
{
public static void ExibirConteudo(string dados)
{
Console.WriteLine();
Console.WriteLine(dados);
var pessoa = JsonSerializer.Deserialize<Pessoa>(dados);
Console.WriteLine($"Nome = {pessoa!.Nome}");
Console.WriteLine($"Cidade = {pessoa!.Cidade}");
Console.WriteLine($"Idade = {pessoa!.Idade}");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment