Skip to content
SimpleJSON is a simple JSON library written in C++. It is designed to be simple to use and be cross platform.
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Allow a JSONValue to be created from an int Jul 6, 2016
test_cases Changed wcslen() to simplejson_wcsnlen() to increase performance on l… Aug 4, 2011
vs2008 Fixing size of text areas in Windows. Mar 8, 2015
xcode5/xcode5.xcodeproj moved group `src`to the pbxproj root and removed the superfluous grou… Nov 6, 2013
LICENSE License changed to MIT Feb 5, 2011
Makefile Mark functions as const where appropriate, and change pass-by-value t… Mar 11, 2011 Updated README to mention JSONArray / JSONObject. Mar 7, 2015


SimpleJSON is a simple JSON library written in C++. It is designed to be simple to use and be cross platform.

The library consists of 2 classes - JSON and JSONValue. The JSON class acts similar to the Javascript JSON object and contains Parse() and Stringify() methods for dealing with decoding and encoding JSON text. The JSONValue class is the class that deals with representing the various JSON values in a C++ way.

Included with the source code is a demo application to give a basic example of how the library works and run some tests on the library. Linux users should just need the basic development tools installed while Windows will need VS2008 to build the project (or be able to handle VS2008 project files).

The library requires no 3rd party libraries and so can be dropped into any existing project effortlessly. It has been tested on Linux and Windows (using VS2008), if you come across any issues with using it on any system, feel free to contact me by visiting my site at


If building for Android and using Visual Studio, make sure Ignore All Default Libraries is set to No. The setting can be changed by going Settings -> Configuration Properties -> Linker -> Input.

If you look at the examples, you will see usage of JSONArray and JSONObject these are simply type definitions as outlined below:

  • JSONArray: std::vector<JSONValue*>
  • JSONObject: std::map<std::wstring, JSONValue*>
You can’t perform that action at this time.