From: Baptiste L. <bl...@us...> - 2005-07-30 17:42:02
|
Update of /cvsroot/jsoncpp/jsoncpp/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8751 Added Files: footer.html header.html jsoncpp.dox readme.txt Log Message: * added more doxygen documentation * added header & footer for web site --- NEW FILE: jsoncpp.dox --- /** \mainpage \section _intro Introduction <a HREF="http://www.json.org/">JSON (JavaScript Object Notation)</a> is a lightweight data-interchange format. It can represents integer, real number, string, an ordered sequence of value, and a collection of name/value pairs. Here is an example of JSON data: \verbatim // Configuration options { // Default encoding for text "encoding" : "UTF-8", // Plug-ins loaded at start-up "plug-ins" : [ "python", "c++", "ruby" ], // Tab indent size indent : 3 } \endverbatim \section _features Features - read and write JSON document - rewrite JSON document preserving original comments \code Json::Value root; // will contains the root value after parsing. Json::Reader reader; bool parsingSuccessful = reader.parse( config_doc, root ); if ( !parsingSuccessful ) { // report to the user the failure and their locations in the document. std::cout << "Failed to parse configuration\n" << reader.getFormatedErrorMessages(); return; } // Get the value of the member of root named 'encoding', return 'UTF-8' if there is no // such member. std::string encoding = root.get("encoding", "UTF-8" ).asString(); // Get the value of the member of root named 'encoding', return a 'null' value if // there is no such member. const Json::Value plugins = root["plug-ins"]; for ( int index = 0; index < plugins.size(); ++index ) // Iterates over the sequence elements. loadPlugIn( plugins[index].asString() ); setIndent( root.get("indent", 3).asInt() ); // ... // At application shutdown to make the new configuration document: // Since Json::Value has implicit constructor for all value types, it is not // necessary to explicitely construct the Json::Value object: root["encoding"] = getCurrentEncoding(); root["indent"] = getCurrentIndent(); Json::StyledWriter writer; // Make a new JSON document for the configuration. Preserve original comments. std::string outputConfig = writer.write( root ); \endcode \section _plinks Project links - <a HREF="http://jsoncpp.sourceforge.net">json-cpp home</a> - <a HREF="http://www.sourceforge.net/projects/jsoncpp">json-cpp sourceforge project</a> \section _rlinks Related links - <a HREF="http://www.json.org/">JSON</a> Specification and alternate language implementations. - <a HREF="http://www.yaml.org/">YAML</a> A data format designed for human readability. - <a HREF="http://www.cl.cam.ac.uk/~mgk25/unicode.html">UTF-8 and Unicode FAQ</a>. \section _license License The json-cpp library and this documentation are in Public Domain. \author Baptiste Lepilleur <bl...@us...> */ --- NEW FILE: footer.html --- <hr> <table width="100%"> <tr> <td width="10%" align="left" valign="center"> <a href="http://sourceforge.net"> <img src="http://sourceforge.net/sflogo.php?group_id=144446" width="88" height="31" border="0" alt="SourceForge Logo"></a> </td> <td width="20%" align="left" valign="center"> hosts this site. </td> <td> </td> <td align="right" valign="center"> Send comments to:<br> <a href="mailto:jso...@li...">Json-cpp Developers</a> </td> </tr> </table> </body> </html> --- NEW FILE: readme.txt --- The documentation is generated using doxygen (http://www.doxygen.org). --- NEW FILE: header.html --- <html> <head> <title> JsonCpp - JSON data format manipulation library </title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head> <body bgcolor="#ffffff"> <table width="100%"> <tr> <td width="40%" align="left" valign="center"> <a href="http://sourceforge.net/projects/jsoncpp"> JsonCpp project page </a> </td> <td width="40%" align="right" valign="center"> <a href="http://jsoncpp.sourceforge.net">JsonCpp home page</a> </td> </tr> </table> <hr> |