Browse files

Updated the readme.

  • Loading branch information...
madbranch committed Jul 20, 2012
1 parent d311240 commit 7630d73ec9de9203268474014a585699478c3c2f
Showing with 12 additions and 23 deletions.
  1. +12 −23 readme.markdown
@@ -1,30 +1,19 @@
<!-- -*- markdown -*- -->
-This is a JSON C++ library. It can write and read JSON files with ease and speed. It uses code from our RedBox engine ( and will soon be integrated in it.
+[JSON]( (JavaScript Object Notation) is a lightweight data-interchange format.
-This library is aimed at mostly internal use for the BaconBox engine. It's not designed be used to write easy-to-read JSON files. It follows the JSON standards (except it doesn't read UTF-16 and UTF-32, only UTF-8)
+Json Box is a C++ library used to read and write JSON with ease and speed.
Things it does:
- * Parse standard UTF-8 JSON files.
- * Write standard JSON files in UTF-8.
- * Uses STL streams for JSON input and output.
- * JSON arrays and objects are actually classes that inherit from a deque (for arrays) and a map (for objects).
- * Can output JSON with or without indentation.
- * Can output JSON and escape all string special characters or only the characters that HAVE to be escaped.
- * Continues reading a JSON file even when their are unwanted characters, it simply ignores the nonsense characters.
+* Follows the standards established on [](
+* Read and write JSON in UTF-8
+* Uses the STL streams for input and output
+* Generated JSON can be indented and pretty or compact and hard-to-read
+* Does not crash when the JSON input contains errors, it simply tries to interpret as much as it can
-Things it doesn't do:
- * Read UTF-16 or UTF-32 JSON files.
- * Keep the order of the members in objects (it's not required by the JSON specification, so I did it the simpler way)
- * Parse Unicode characters in strings that are described with two consecutive \u escape sequences, it will interpret it as 2 unicode characters.
- * The error messages aren't always very clear.
-This library isn't what I would call typesafe. It's "typesafe" when you use it from the outside, but internally, it isn't. I can see the library going crazy if it's used in a multi-threaded program, it wasn't designed for multi-threading.
+Things it does not do:
+* Read JSON in UTF-16 or UTF-32
+* Keep the order of the members in objects (the standard doesn't require keeping the order)
+* Write useful error messages when the JSON input contains errors
-The Value type has a small memory footprint because it uses a union of different pointer types and an enum to know which type of data the value points to with its union of pointers.
+The library wasn't designed with multi-threading in mind.
-To build the library by itself, you can use cmake. The simple way is to use the command "cmake ./" while being in the directory containing the CMakeLists.txt.
-You can simply copy the include and source files in your project. The library only depends on the STL and nothing else special, so it should build on pretty much anything.

0 comments on commit 7630d73

Please sign in to comment.