Use of this code is not recommended by its author. Try JSONObject. This page is here for purely historical reasons.
This software has known bugs. It does not seem to build for iOS and has not been tested on Unity 4. The author in fact recommends that you use JSONObject, while JSONParse is being rewritten.
What is it?
Why not just use eval()?
First, it's really really slow.
More importantly, it's a REALLY BAD idea to use eval on JSON received from an external source. It's a huge security hole and leaves you vulnerable to code-injection/man-in-the-middle attacks.
Where's the code?
Both of these versions are not recommended as the author is ashamed of the code quality that both are based on, and the original is no longer maintained (but is being superseded at the moment...)
The following is a re-working of the original so that the code compiles on iOS/Android/etc.: https://github.com/tonioloewald/jsonparse
- Note from the reworking author: I (Tonio Loewald/podperson) reworked this code pretty extensively and it seems to work for me. I have not tested it extensively (yet) but it should be pretty easy to identify and fix any remaining errors as quite a bit of "voodoo" has been removed. It now runs well for me in iOS. Since I haven't tested my application yet, I'm leaving the warning in tact.
- I've linked this to an extensively modified version of the earlier code which compiles for mobile, has a convenient (strongly typed) wrapper object, and while lets you fairly conveniently create as well as consume JSON data.
The original code is here: Download from GitHub.