Skip to content

VQComms/ScriptCs.Json

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ScriptCs.Json NuGet

This is a cross platform ScriptCs library that allows you deserialize JSON into objects.

Usage

scriptcs -install ScriptCs.Json

public class Person
{
    public string FirstName{ get; set; }

    public string LastName{ get; set; }

    public string FullName{ get { return FirstName + " " + LastName; } }
}

var myjson = "{\"firstname\":\"bob\",\"lastname\":\"smith\"}";

var json = new Json();

var person = json.Deserialize<Person>(myjson);
Console.WriteLine(person.FullName);

var otherPerson = json.DeserializeFromFile<Person>("json.txt");
Console.WriteLine(otherPerson.FullName);

Console.WriteLine("Fin!");

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages