Commit b30c3c05 authored by Philipp A. Hartmann's avatar Philipp A. Hartmann

readme.md: prepare Markdown for GitHub and Doxygen rendering

parent 53b27ac8
# RapidJSON
# RapidJSON {#mainpage}
Copyright (c) 2011-2014 Milo Yip (miloyip@gmail.com)
......@@ -37,7 +37,7 @@ Users can build and run the unit tests on their platform/compiler.
## Installation
RapidJSON is a header-only C++ library. Just copy the `rapidjson/include/rapidjson` folder to system or project's include path.
RapidJSON is a header-only C++ library. Just copy the `include/rapidjson` folder to system or project's include path.
To build the tests and examples:
......@@ -45,15 +45,21 @@ To build the tests and examples:
2. Copy premake4 executable to RapidJSON/build (or system path)
3. Run `rapidjson/build/premake.bat` on Windows, `RapidJSON/build/premake.sh` on Linux or other platforms
4. On Windows, build the solution at `rapidjson/build/vs2008/` or `/vs2010/`
5. On other platforms, run GNU make at `rapidjson/build/gmake/` (e.g., `make -f test.make config=release32`, `make -f example.make config=debug32`)
5. On other platforms, run GNU make at `rapidjson/build/gmake/` (e.g., `make -f test.make config=release32`; `make -f example.make config=debug32`)
6. On success, the executable are generated at `rapidjson/bin`
To build the [Doxygen](http://doxygen.org) documentation:
1. Obtain and install [Doxygen](http://doxygen.org/download.html).
2. In the top-level directory, run `doxygen build/Doxyfile`.
3. Browse the generated documentation in `doc/html`.
## Usage at a glance
This simple example parses a JSON string into a document (DOM), make a simple modification of the DOM, and finally stringify the DOM to a JSON string.
[simpledom.cpp](example/simpledom/simpledom.cpp)
```cpp
~~~~~~~~~~cpp
#include "rapidjson/document.h"
#include "rapidjson/writer.h"
#include "rapidjson/stringbuffer.h"
......@@ -80,12 +86,12 @@ int main() {
std::cout << buffer.GetString() << std::endl;
return 0;
}
```
~~~~~~~~~~
Note that this example did not handle potential errors.
The following diagram shows the process.
![simpledom](doc/diagram/simpledom.png?raw=true)
![simpledom](doc/diagram/simpledom.png)
More [examples](example/) are available.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment