Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
J

json

> 编程语言
Open source

A really simple C# JSON Parser in 350 lines

342 stars0 likes1 views
WebsiteGitHub

About

A really simple C# JSON Parser in 350 lines

Tiny Json

A really simple C# JSON parser in ~350 lines

  • Attempts to parse JSON files with minimal GC allocation
  • Nice and simple "[1,2,3]".FromJson>() API
  • Classes and structs can be parsed too!
csharp
class Foo 
{ 
  public int Value;
}
"{\"Value\":10}".FromJson()
  • Anonymous JSON is parsed into Dictionary and List
csharp
var test = "{\"Value\":10}".FromJson();
int number = ((Dictionary)test)["Value"];
  • No JIT Emit support to support AOT compilation on iOS
  • Attempts are made to NOT throw an exception if the JSON is corrupted or invalid: returns null instead.
  • Only public fields and property setters on classes/structs will be written to
  • You can optionally use [IgnoreDataMember] and [DataMember(Name="Foo")] to ignore vars and override the default name

Limitations:

  • No JIT Emit support to parse structures quickly
  • Limited to parsing (); } }
Save this as `JsonTest.cs` then compile and run with `mcs JsonTest.cs && mono JsonTest.exe`

## Installation

Simply copy and paste the [JSON Parser](https://raw.githubusercontent.com/zanders3/json/master/src/JSONParser.cs) and/or the [JSON Writer](https://raw.githubusercontent.com/zanders3/json/master/src/JSONWriter.cs) into your project. I also provide NuGet but I recommend the copy paste route ;)

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

C#json-parserlow-memorynugetunity-3d

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言