A lightweight JSON implementation for Mono/.NET
https://schwann.lnvpn.de/haraldwolff/sharp-json
1557eef64c | ||
---|---|---|
.vs/sharp.json/xs | ||
Properties | ||
attributes | ||
json.test | ||
mapping | ||
reflection | ||
.gitignore | ||
JSONArray.cs | ||
JSONNumber.cs | ||
JSONObject.cs | ||
JSONParser.cs | ||
JSONSpecial.cs | ||
JSONString.cs | ||
JSONTypes.cs | ||
JSONValue.cs | ||
README.md | ||
ln.json.csproj | ||
sharp.json.csproj.user | ||
sharp.json.sln |
README.md
sharp-json
A lightweight JSON implementation for Mono/.NET
Usage
Use the base type ln.json.JSON to represent JSON variables.
import ln.json;
...
JSON n = 123.45;
JSON s = "Hello World!"
Console.WriteLine("A number: {0}",n.ToString());
Console.WriteLine("A String: {0}",s.ToString());
To parse JSON from text you may use
JSONParser parser = new JSONParser();
JSON json = parser.Parse("[ 0, 1, 2, 3 ]");
Console.WriteLine("json: {0}",json);