diff --git a/doc/Doxyfile b/doc/Doxyfile index f1b3b367..a5c2fc01 100644 --- a/doc/Doxyfile +++ b/doc/Doxyfile @@ -101,7 +101,7 @@ WARN_LOGFILE = #--------------------------------------------------------------------------- # Configuration options related to the input files #--------------------------------------------------------------------------- -INPUT = ../src/json.hpp +INPUT = ../src/json.hpp index.md INPUT_ENCODING = UTF-8 FILE_PATTERNS = RECURSIVE = NO @@ -117,7 +117,7 @@ INPUT_FILTER = FILTER_PATTERNS = FILTER_SOURCE_FILES = NO FILTER_SOURCE_PATTERNS = -USE_MDFILE_AS_MAINPAGE = +USE_MDFILE_AS_MAINPAGE = index.md #--------------------------------------------------------------------------- # Configuration options related to source browsing #--------------------------------------------------------------------------- diff --git a/doc/index.md b/doc/index.md new file mode 100644 index 00000000..b628da31 --- /dev/null +++ b/doc/index.md @@ -0,0 +1,21 @@ +# JSON for Modern C++ + +These pages contain the API documentation of JSON for Modern C++, a C++11 header-only JSON class. + +- @link nlohmann::basic_json `basic_json` class @endlink +- Types + - @link nlohmann::basic_json::array_t arrays @endlink + - @link nlohmann::basic_json::object_t objects @endlink + - @link nlohmann::basic_json::string_t strings @endlink + - @link nlohmann::basic_json::boolean_t booleans @endlink + - numbers + - @link nlohmann::basic_json::number_integer_t signed integers @endlink + - @link nlohmann::basic_json::number_unsigned_t unsigned integers @endlink + - @link nlohmann::basic_json::number_float_t floating-point @endlink + +@copyright Copyright © 2013-2016 Niels Lohmann. The code is licensed under the [MIT License](http://opensource.org/licenses/MIT). + +@author [Niels Lohmann](http://nlohmann.me) +@see https://github.com/nlohmann/json to download the source code + +@version 2.0.0 diff --git a/src/json.hpp b/src/json.hpp index 9f92ceab..4b718837 100644 --- a/src/json.hpp +++ b/src/json.hpp @@ -1,38 +1,11 @@ -/*! -@mainpage +/* + __ _____ _____ _____ + __| | __| | | | JSON for Modern C++ +| | |__ | | | | | | version 2.0.0 +|_____|_____|_____|_|___| https://github.com/nlohmann/json -These pages contain the API documentation of JSON for Modern C++, a C++11 -header-only JSON class. - -Class @ref nlohmann::basic_json is a good entry point for the documentation. - -@copyright The code is licensed under the [MIT - License](http://opensource.org/licenses/MIT): -
- Copyright © 2013-2016 Niels Lohmann. -
- Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: -
- The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. -
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. - -@author [Niels Lohmann](http://nlohmann.me) -@see https://github.com/nlohmann/json to download the source code - -@version 2.0.0 +Copyright (c) 2013-2016 Niels Lohmann . +Licensed under the MIT License . */ #ifndef NLOHMANN_JSON_HPP @@ -175,7 +148,8 @@ default) @note ObjectType trick from http://stackoverflow.com/a/9860911 @endinternal -@see RFC 7159 +@see [RFC 7159: The JavaScript Object Notation (JSON) Data Interchange +Format](http://rfc7159.net/rfc7159) @since version 1.0.0 @@ -1405,7 +1379,7 @@ class basic_json @param[in] val a floating-point value to create a JSON number from - @note RFC 7159 , section 6 + @note [RFC 7159](http://www.rfc-editor.org/rfc/rfc7159.txt), section 6 disallows NaN values: > Numeric values that cannot be represented in the grammar below (such > as Infinity and NaN) are not permitted. @@ -1445,7 +1419,7 @@ class basic_json @param[in] val a floating-point to create a JSON number from - @note RFC 7159 , section 6 + @note [RFC 7159](http://www.rfc-editor.org/rfc/rfc7159.txt), section 6 disallows NaN values: > Numeric values that cannot be represented in the grammar below (such > as Infinity and NaN) are not permitted. @@ -6910,7 +6884,7 @@ class basic_json @brief lexical analysis This class organizes the lexical analysis during JSON deserialization. The - core of it is a scanner generated by re2c that processes + core of it is a scanner generated by [re2c](http://re2c.org) that processes a buffer and recognizes tokens according to RFC 7159. */ class lexer @@ -7090,10 +7064,10 @@ class basic_json /*! This function implements a scanner for JSON. It is specified using regular expressions that try to follow RFC 7159 as close as possible. - These regular expressions are then translated into a deterministic - finite automaton (DFA) by the tool re2c . As a result, - the translated code for this function consists of a large block of code - with goto jumps. + These regular expressions are then translated into a minimized + deterministic finite automaton (DFA) by the tool + [re2c](http://re2c.org). As a result, the translated code for this + function consists of a large block of code with `goto` jumps. @return the class of the next token read from the buffer */ diff --git a/src/json.hpp.re2c b/src/json.hpp.re2c index 4cbf91a9..a5714e8d 100644 --- a/src/json.hpp.re2c +++ b/src/json.hpp.re2c @@ -1,38 +1,11 @@ -/*! -@mainpage +/* + __ _____ _____ _____ + __| | __| | | | JSON for Modern C++ +| | |__ | | | | | | version 2.0.0 +|_____|_____|_____|_|___| https://github.com/nlohmann/json -These pages contain the API documentation of JSON for Modern C++, a C++11 -header-only JSON class. - -Class @ref nlohmann::basic_json is a good entry point for the documentation. - -@copyright The code is licensed under the [MIT - License](http://opensource.org/licenses/MIT): -
- Copyright © 2013-2016 Niels Lohmann. -
- Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: -
- The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. -
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. - -@author [Niels Lohmann](http://nlohmann.me) -@see https://github.com/nlohmann/json to download the source code - -@version 2.0.0 +Copyright (c) 2013-2016 Niels Lohmann . +Licensed under the MIT License . */ #ifndef NLOHMANN_JSON_HPP @@ -175,7 +148,8 @@ default) @note ObjectType trick from http://stackoverflow.com/a/9860911 @endinternal -@see RFC 7159 +@see [RFC 7159: The JavaScript Object Notation (JSON) Data Interchange +Format](http://rfc7159.net/rfc7159) @since version 1.0.0 @@ -1405,7 +1379,7 @@ class basic_json @param[in] val a floating-point value to create a JSON number from - @note RFC 7159 , section 6 + @note [RFC 7159](http://www.rfc-editor.org/rfc/rfc7159.txt), section 6 disallows NaN values: > Numeric values that cannot be represented in the grammar below (such > as Infinity and NaN) are not permitted. @@ -1445,7 +1419,7 @@ class basic_json @param[in] val a floating-point to create a JSON number from - @note RFC 7159 , section 6 + @note [RFC 7159](http://www.rfc-editor.org/rfc/rfc7159.txt), section 6 disallows NaN values: > Numeric values that cannot be represented in the grammar below (such > as Infinity and NaN) are not permitted. @@ -6910,7 +6884,7 @@ class basic_json @brief lexical analysis This class organizes the lexical analysis during JSON deserialization. The - core of it is a scanner generated by re2c that processes + core of it is a scanner generated by [re2c](http://re2c.org) that processes a buffer and recognizes tokens according to RFC 7159. */ class lexer @@ -7090,10 +7064,10 @@ class basic_json /*! This function implements a scanner for JSON. It is specified using regular expressions that try to follow RFC 7159 as close as possible. - These regular expressions are then translated into a deterministic - finite automaton (DFA) by the tool re2c . As a result, - the translated code for this function consists of a large block of code - with goto jumps. + These regular expressions are then translated into a minimized + deterministic finite automaton (DFA) by the tool + [re2c](http://re2c.org). As a result, the translated code for this + function consists of a large block of code with `goto` jumps. @return the class of the next token read from the buffer */ diff --git a/test/unit.cpp b/test/unit.cpp index 71ed643e..efb8adae 100644 --- a/test/unit.cpp +++ b/test/unit.cpp @@ -1,10 +1,11 @@ -/*! -@file -@copyright The code is licensed under the MIT License - , - Copyright (c) 2013-2015 Niels Lohmann. -@author Niels Lohmann -@see https://github.com/nlohmann/json +/* + __ _____ _____ _____ + __| | __| | | | JSON for Modern C++ (test suite) +| | |__ | | | | | | version 2.0.0 +|_____|_____|_____|_|___| https://github.com/nlohmann/json + +Copyright (c) 2013-2016 Niels Lohmann . +Licensed under the MIT License . */ #define CATCH_CONFIG_MAIN