Skip to content

Instantly share code, notes, and snippets.

@jpsarda
jpsarda / MiniJSON.cs
Last active July 10, 2020 00:46 — forked from darktable/MiniJSON.cs
Added comments support, everything after a "#" is ignored, except if the "#" is in a token. It seems to work approximately the way monodevelop show the comments in orange color in a json file. (I know comments are not part of the json format, but it comes in handy sometimes).
/*
* Copyright (c) 2012 Calvin Rien
*
* Based on the JSON parser by Patrick van Bergen
* http://techblog.procurios.nl/k/618/news/view/14605/14863/How-do-I-write-my-own-parser-for-JSON.html
*
* Simplified it so that it doesn't throw exceptions
* and can be used in Unity iPhone with maximum code stripping.
*
* Permission is hereby granted, free of charge, to any person obtaining