Search code examples
c#serializationdeserializationreplit

Error given when trying to use Sytem.Text.Json


When I try to include the namespace System.Text.Json, I am given the following error:

The type or namespace called 'JSON' does not exist in the namespace 'System.Text'. Are you missing an assembly reference?

I need this for serializing objects and I am currently using Repl.it on a Chromebook. Have I done something wrong and if not, is there some other way of solving this?

I can not upload an entire folder (limitations when using Repl.it) so solutions like json.net will likely not work.


Solution

  • System.Text.Json is new namespace, you need to install it as Nuget package.