Skip to content
Sign UpLog In
This post is read-only. Explore Repls and connect with other creators on Community.View Community
The info in this post might be out of date, check out our docs instead. View docs
4

Problens with System.Text.Json [C#]

gabrielbertoldo
gabrielbertoldo

for some reason the line of code using System.text.Json; wont work saying: error CS0234: The type or namespace name Json' does not exist in the namespaceSystem.Text'.Are you missing an assembly reference?

using System;
using System.IO;
using System.Collections.Generic;
using System.Text.Json;
using System.Text.Json.Serialization;

class Empacotar
{
public static void GeraArquivo()
{
string jsonString;
jsonString = JsonSerializer.Serialize(jogador);
File.WriteAllText(fileName, jsonString);
}
}

3 years ago
You are viewing a single comment. View All
1
gabrielbertoldo
gabrielbertoldo

@SixBeeps
Sure

using System;
using System.IO;
using System.Collections.Generic;
using System.Text.Json;
using System.Text.Json.Serialization;

class Empacotar
{
public static void GeraArquivo()
{
string jsonString;
jsonString = JsonSerializer.Serialize(jogador);
File.WriteAllText(fileName, jsonString);
}
}

3 years ago