Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
json
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
json
Commits
57d822b6
Unverified
Commit
57d822b6
authored
Aug 14, 2017
by
Théo DELRIEU
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add missing includes, put back include comments
parent
9cab30cf
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
123 additions
and
87 deletions
+123
-87
from_json.hpp
src/detail/conversions/from_json.hpp
+10
-8
to_json.hpp
src/detail/conversions/to_json.hpp
+7
-3
iter_impl.hpp
src/detail/iterators/iter_impl.hpp
+7
-2
iteration_proxy.hpp
src/detail/iterators/iteration_proxy.hpp
+4
-2
json_reverse_iterator.hpp
src/detail/iterators/json_reverse_iterator.hpp
+3
-3
primitive_iterator.hpp
src/detail/iterators/primitive_iterator.hpp
+4
-3
macro_scope.hpp
src/detail/macro_scope.hpp
+2
-0
meta.hpp
src/detail/meta.hpp
+5
-4
binary_reader.hpp
src/detail/parsing/binary_reader.hpp
+14
-8
binary_writer.hpp
src/detail/parsing/binary_writer.hpp
+5
-5
input_adapters.hpp
src/detail/parsing/input_adapters.hpp
+13
-6
lexer.hpp
src/detail/parsing/lexer.hpp
+9
-3
output_adapters.hpp
src/detail/parsing/output_adapters.hpp
+8
-6
parser.hpp
src/detail/parsing/parser.hpp
+7
-4
serializer.hpp
src/detail/serializer.hpp
+14
-11
value_t.hpp
src/detail/value_t.hpp
+3
-2
json.hpp
src/json.hpp
+6
-15
json_fwd.hpp
src/json_fwd.hpp
+2
-2
No files found.
src/detail/conversions/from_json.hpp
View file @
57d822b6
#ifndef NLOHMANN_JSON_DETAIL_CONVERSIONS_FROM_JSON_HPP
#ifndef NLOHMANN_JSON_DETAIL_CONVERSIONS_FROM_JSON_HPP
#define NLOHMANN_JSON_DETAIL_CONVERSIONS_FROM_JSON_HPP
#define NLOHMANN_JSON_DETAIL_CONVERSIONS_FROM_JSON_HPP
#include <array>
#include <algorithm> // transform
#include <tuple>
#include <array> // array
#include <utility>
#include <ciso646> // and, not
#include <valarray>
#include <forward_list> // forward_list
#include <iterator> // inserter, front_inserter, end
#include <string> // string
#include <tuple> // tuple, make_tuple
#include <type_traits> // is_arithmetic, is_same, is_enum, underlying_type, is_convertible
#include <utility> // pair, declval
#include <valarray> // valarray
#include "detail/exceptions.hpp"
#include "detail/exceptions.hpp"
#include "detail/macro_scope.hpp"
#include "detail/macro_scope.hpp"
...
@@ -15,10 +21,6 @@ namespace nlohmann
...
@@ -15,10 +21,6 @@ namespace nlohmann
{
{
namespace
detail
namespace
detail
{
{
///////////////
// from_json //
///////////////
// overloads for basic_json template parameters
// overloads for basic_json template parameters
template
<
typename
BasicJsonType
,
typename
ArithmeticType
,
template
<
typename
BasicJsonType
,
typename
ArithmeticType
,
enable_if_t
<
std
::
is_arithmetic
<
ArithmeticType
>::
value
and
enable_if_t
<
std
::
is_arithmetic
<
ArithmeticType
>::
value
and
...
...
src/detail/conversions/to_json.hpp
View file @
57d822b6
#ifndef NLOHMANN_JSON_DETAIL_CONVERSIONS_TO_JSON_HPP
#ifndef NLOHMANN_JSON_DETAIL_CONVERSIONS_TO_JSON_HPP
#define NLOHMANN_JSON_DETAIL_CONVERSIONS_TO_JSON_HPP
#define NLOHMANN_JSON_DETAIL_CONVERSIONS_TO_JSON_HPP
#include <type_traits>
#include <ciso646> // or, and, not
#include <utility>
#include <iterator> // begin, end
#include <valarray>
#include <tuple> // tuple, get
#include <type_traits> // is_same, is_constructible, is_floating_point, is_enum, underlying_type
#include <utility> // move, forward, declval, pair
#include <valarray> // valarray
#include <vector> // vector
#include "detail/meta.hpp"
#include "detail/meta.hpp"
#include "detail/value_t.hpp"
#include "detail/value_t.hpp"
...
...
src/detail/iterators/iter_impl.hpp
View file @
57d822b6
#ifndef NLOHMANN_JSON_DETAIL_ITERATORS_ITER_IMPL_HPP
#ifndef NLOHMANN_JSON_DETAIL_ITERATORS_ITER_IMPL_HPP
#define NLOHMANN_JSON_DETAIL_ITERATORS_ITER_IMPL_HPP
#define NLOHMANN_JSON_DETAIL_ITERATORS_ITER_IMPL_HPP
#include <iterator>
#include <ciso646> // not
#include <type_traits>
#include <iterator> // iterator, random_access_iterator_tag, bidirectional_iterator_tag, advance, next
#include <type_traits> // conditional, is_const, remove_const
#include "detail/exceptions.hpp"
#include "detail/exceptions.hpp"
#include "detail/iterators/internal_iterator.hpp"
#include "detail/iterators/primitive_iterator.hpp"
#include "detail/macro_scope.hpp"
#include "detail/macro_scope.hpp"
#include "detail/meta.hpp"
#include "detail/value_t.hpp"
namespace
nlohmann
namespace
nlohmann
{
{
...
...
src/detail/iterators/iteration_proxy.hpp
View file @
57d822b6
#ifndef NLOHMANN_JSON_DETAIL_ITERATORS_ITERATION_PROXY_HPP
#ifndef NLOHMANN_JSON_DETAIL_ITERATORS_ITERATION_PROXY_HPP
#define NLOHMANN_JSON_DETAIL_ITERATORS_ITERATION_PROXY_HPP
#define NLOHMANN_JSON_DETAIL_ITERATORS_ITERATION_PROXY_HPP
#include <cstddef>
#include <cstddef> // size_t
#include <string>
#include <string> // string, to_string
#include "detail/value_t.hpp"
namespace
nlohmann
namespace
nlohmann
{
{
...
...
src/detail/iterators/json_reverse_iterator.hpp
View file @
57d822b6
#ifndef NLOHMANN_JSON_DETAIL_ITERATORS_JSON_REVERSE_ITERATOR_HPP
#ifndef NLOHMANN_JSON_DETAIL_ITERATORS_JSON_REVERSE_ITERATOR_HPP
#define NLOHMANN_JSON_DETAIL_ITERATORS_JSON_REVERSE_ITERATOR_HPP
#define NLOHMANN_JSON_DETAIL_ITERATORS_JSON_REVERSE_ITERATOR_HPP
#include <cstddef>
#include <cstddef>
// ptrdiff_t
#include <iterator>
#include <iterator>
// reverse_iterator
#include <utility>
#include <utility>
// declval
namespace
nlohmann
namespace
nlohmann
{
{
...
...
src/detail/iterators/primitive_iterator.hpp
View file @
57d822b6
#ifndef NLOHMANN_JSON_DETAIL_ITERATORS_PRIMITIVE_ITERATOR_HPP
#ifndef NLOHMANN_JSON_DETAIL_ITERATORS_PRIMITIVE_ITERATOR_HPP
#define NLOHMANN_JSON_DETAIL_ITERATORS_PRIMITIVE_ITERATOR_HPP
#define NLOHMANN_JSON_DETAIL_ITERATORS_PRIMITIVE_ITERATOR_HPP
#include <cstddef>
#include <ciso646> // not
#include <iosfwd>
#include <cstddef> // ptrdiff_t
#include <limits>
#include <limits> // numeric_limits
#include <ostream> // ostream
namespace
nlohmann
namespace
nlohmann
{
{
...
...
src/detail/macro_scope.hpp
View file @
57d822b6
#ifndef NLOHMANN_JSON_MACRO_SCOPE_HPP
#ifndef NLOHMANN_JSON_MACRO_SCOPE_HPP
#define NLOHMANN_JSON_MACRO_SCOPE_HPP
#define NLOHMANN_JSON_MACRO_SCOPE_HPP
#include <ciso646> // not
// This file contains all internal macro definitions
// This file contains all internal macro definitions
// You MUST include macro_unscope.hpp at the end of json.hpp to undef all of them
// You MUST include macro_unscope.hpp at the end of json.hpp to undef all of them
...
...
src/detail/meta.hpp
View file @
57d822b6
#ifndef NLOHMANN_JSON_DETAIL_META_HPP
#ifndef NLOHMANN_JSON_DETAIL_META_HPP
#define NLOHMANN_JSON_DETAIL_META_HPP
#define NLOHMANN_JSON_DETAIL_META_HPP
#include <cstdint>
#include <ciso646> // not
#include <limits>
#include <cstddef> // size_t
#include <type_traits> // add_pointer, conditional, decay, enable_if, false_type, integral_constant, is_arithmetic, is_base_of, is_const, is_constructible, is_convertible, is_default_constructible, is_enum, is_floating_point, is_integral, is_nothrow_move_assignable, is_nothrow_move_constructible, is_pointer, is_reference, is_same, is_scalar, is_signed, remove_const, remove_cv, remove_pointer, remove_reference, true_type, underlying_type
#include <limits> // numeric_limits
#include <utility>
#include <type_traits> // conditional, enable_if, false_type, integral_constant, is_constructible, is_integral, is_same, remove_cv, remove_reference, true_type
#include <utility> // declval
#include "json_fwd.hpp"
#include "json_fwd.hpp"
#include "detail/macro_scope.hpp"
#include "detail/macro_scope.hpp"
...
...
src/detail/parsing/binary_reader.hpp
View file @
57d822b6
#ifndef NLOHMANN_JSON_DETAIL_PARSING_BINARY_READER_HPP
#ifndef NLOHMANN_JSON_DETAIL_PARSING_BINARY_READER_HPP
#define NLOHMANN_JSON_DETAIL_PARSING_BINARY_READER_HPP
#define NLOHMANN_JSON_DETAIL_PARSING_BINARY_READER_HPP
#include <algorithm>
#include <algorithm> // generate_n
#include <array>
#include <array> // array
#include <cstdint>
#include <cassert> // assert
#include <cstring>
#include <cmath> // ldexp
#include <iomanip>
#include <cstddef> // size_t
#include <sstream>
#include <cstdint> // uint8_t, uint16_t, uint32_t, uint64_t
#include <string>
#include <cstring> // memcpy
#include <utility>
#include <iomanip> // setw, setfill
#include <ios> // hex
#include <iterator> // back_inserter
#include <limits> // numeric_limits
#include <sstream> // stringstream
#include <string> // char_traits, string
#include <utility> // make_pair, move
#include "detail/exceptions.hpp"
#include "detail/exceptions.hpp"
#include "detail/macro_scope.hpp"
#include "detail/macro_scope.hpp"
...
...
src/detail/parsing/binary_writer.hpp
View file @
57d822b6
#ifndef NLOHMANN_JSON_DETAIL_PARSING_BINARY_WRITER_HPP
#ifndef NLOHMANN_JSON_DETAIL_PARSING_BINARY_WRITER_HPP
#define NLOHMANN_JSON_DETAIL_PARSING_BINARY_WRITER_HPP
#define NLOHMANN_JSON_DETAIL_PARSING_BINARY_WRITER_HPP
#include <algorithm>
#include <algorithm>
// reverse
#include <array>
#include <array>
// array
#include <cstdint>
#include <cstdint>
// uint8_t, uint16_t, uint32_t, uint64_t
#include <cstring>
#include <cstring>
// memcpy
#include <limits>
#include <limits>
// numeric_limits
#include "detail/parsing/binary_reader.hpp"
#include "detail/parsing/binary_reader.hpp"
#include "detail/parsing/output_adapters.hpp"
#include "detail/parsing/output_adapters.hpp"
...
...
src/detail/parsing/input_adapters.hpp
View file @
57d822b6
#ifndef NLOHMANN_JSON_DETAIL_PARSING_INPUT_ADAPTERS_HPP
#ifndef NLOHMANN_JSON_DETAIL_PARSING_INPUT_ADAPTERS_HPP
#define NLOHMANN_JSON_DETAIL_PARSING_INPUT_ADAPTERS_HPP
#define NLOHMANN_JSON_DETAIL_PARSING_INPUT_ADAPTERS_HPP
#include <algorithm>
#include <algorithm> // min
#include <array>
#include <array> // array
#include <cstddef>
#include <cassert> // assert
#include <iosfwd>
#include <cstddef> // size_t
#include <memory>
#include <cstring> // strlen
#include <string>
#include <ios> // streamsize, streamoff, streampos
#include <istream> // istream
#include <iterator> // begin, end, iterator_traits, random_access_iterator_tag, distance, next
#include <memory> // shared_ptr, make_shared, addressof
#include <numeric> // accumulate
#include <string> // string, char_traits
#include <type_traits> // enable_if, is_base_of, is_pointer, is_integral, remove_pointer
#include <utility> // pair, declval
#include "detail/macro_scope.hpp"
#include "detail/macro_scope.hpp"
...
...
src/detail/parsing/lexer.hpp
View file @
57d822b6
#ifndef NLOHMANN_JSON_DETAIL_PARSING_LEXER_HPP
#ifndef NLOHMANN_JSON_DETAIL_PARSING_LEXER_HPP
#define NLOHMANN_JSON_DETAIL_PARSING_LEXER_HPP
#define NLOHMANN_JSON_DETAIL_PARSING_LEXER_HPP
#include <clocale>
#include <clocale> // localeconv
#include <cstddef>
#include <cstddef> // size_t
#include <vector>
#include <cstdlib> // strtof, strtod, strtold, strtoll, strtoull
#include <initializer_list> // initializer_list
#include <ios> // hex, uppercase
#include <iomanip> // setw, setfill
#include <sstream> // stringstream
#include <string> // char_traits, string
#include <vector> // vector
#include "detail/macro_scope.hpp"
#include "detail/macro_scope.hpp"
#include "detail/parsing/input_adapters.hpp"
#include "detail/parsing/input_adapters.hpp"
...
...
src/detail/parsing/output_adapters.hpp
View file @
57d822b6
#ifndef NLOHMANN_JSON_DETAIL_PARSING_OUTPUT_ADAPTERS_HPP
#ifndef NLOHMANN_JSON_DETAIL_PARSING_OUTPUT_ADAPTERS_HPP
#define NLOHMANN_JSON_DETAIL_PARSING_OUTPUT_ADAPTERS_HPP
#define NLOHMANN_JSON_DETAIL_PARSING_OUTPUT_ADAPTERS_HPP
#include <algorithm>
#include <algorithm> // copy
#include <cstddef>
#include <cstddef> // size_t
#include <iosfwd>
#include <ios> // streamsize
#include <iterator>
#include <iterator> // back_inserter
#include <memory>
#include <memory> // shared_ptr, make_shared
#include <vector>
#include <ostream> // basic_ostream
#include <string> // basic_string
#include <vector> // vector
namespace
nlohmann
namespace
nlohmann
{
{
...
...
src/detail/parsing/parser.hpp
View file @
57d822b6
#ifndef NLOHMANN_JSON_DETAIL_PARSING_PARSER_HPP
#ifndef NLOHMANN_JSON_DETAIL_PARSING_PARSER_HPP
#define NLOHMANN_JSON_DETAIL_PARSING_PARSER_HPP
#define NLOHMANN_JSON_DETAIL_PARSING_PARSER_HPP
#include <cmath>
#include <cassert> // assert
#include <functional>
#include <cmath> // isfinite
#include <string>
#include <cstdint> // uint8_t
#include <utility>
#include <functional> // function
#include <string> // string
#include <utility> // move
#include "detail/exceptions.hpp"
#include "detail/exceptions.hpp"
#include "detail/macro_scope.hpp"
#include "detail/macro_scope.hpp"
#include "detail/parsing/input_adapters.hpp"
#include "detail/parsing/input_adapters.hpp"
#include "detail/parsing/lexer.hpp"
#include "detail/parsing/lexer.hpp"
#include "detail/value_t.hpp"
namespace
nlohmann
namespace
nlohmann
{
{
...
...
src/detail/serializer.hpp
View file @
57d822b6
#ifndef NLOHMANN_JSON_DETAIL_SERIALIZER_HPP
#ifndef NLOHMANN_JSON_DETAIL_SERIALIZER_HPP
#define NLOHMANN_JSON_DETAIL_SERIALIZER_HPP
#define NLOHMANN_JSON_DETAIL_SERIALIZER_HPP
#include <algorithm>
#include <algorithm> // reverse, remove, fill, find, none_of
#include <array>
#include <array> // array
#include <clocale>
#include <cassert> // assert
#include <cmath>
#include <ciso646> // and, or
#include <cstddef>
#include <clocale> // localeconv, lconv
#include <cstdint>
#include <cmath> // labs, isfinite, isnan, signbit
#include <cstdio>
#include <cstddef> // size_t, ptrdiff_t
#include <iterator>
#include <cstdint> // uint8_t
#include <limits>
#include <cstdio> // snprintf
#include <string>
#include <iterator> // next
#include <type_traits>
#include <limits> // numeric_limits
#include <string> // string
#include <type_traits> // is_same
#include "detail/macro_scope.hpp"
#include "detail/macro_scope.hpp"
#include "detail/meta.hpp"
#include "detail/meta.hpp"
#include "detail/parsing/output_adapters.hpp"
#include "detail/parsing/output_adapters.hpp"
#include "detail/value_t.hpp"
namespace
nlohmann
namespace
nlohmann
{
{
...
...
src/detail/value_t.hpp
View file @
57d822b6
#ifndef NLOHMANN_JSON_DETAIL_VALUE_T_HPP
#ifndef NLOHMANN_JSON_DETAIL_VALUE_T_HPP
#define NLOHMANN_JSON_DETAIL_VALUE_T_HPP
#define NLOHMANN_JSON_DETAIL_VALUE_T_HPP
#include <array> // array
#include <ciso646> // and
#include <ciso646> // and
#include <cstddef> // size_t
#include <cstddef> // size_t
#include <cstdint> // uint8_t
#include <cstdint> // uint8_t
...
@@ -37,7 +38,7 @@ value with the default value for a given type
...
@@ -37,7 +38,7 @@ value with the default value for a given type
@since version 1.0.0
@since version 1.0.0
*/
*/
enum
class
value_t
:
uint8_t
enum
class
value_t
:
std
::
uint8_t
{
{
null
,
///< null value
null
,
///< null value
object
,
///< object (unordered set of name/value pairs)
object
,
///< object (unordered set of name/value pairs)
...
@@ -62,7 +63,7 @@ Returns an ordering that is similar to Python:
...
@@ -62,7 +63,7 @@ Returns an ordering that is similar to Python:
*/
*/
inline
bool
operator
<
(
const
value_t
lhs
,
const
value_t
rhs
)
noexcept
inline
bool
operator
<
(
const
value_t
lhs
,
const
value_t
rhs
)
noexcept
{
{
static
constexpr
std
::
array
<
uint8_t
,
8
>
order
=
{{
static
constexpr
std
::
array
<
std
::
uint8_t
,
8
>
order
=
{{
0
/* null */
,
3
/* object */
,
4
/* array */
,
5
/* string */
,
0
/* null */
,
3
/* object */
,
4
/* array */
,
5
/* string */
,
1
/* boolean */
,
2
/* integer */
,
2
/* unsigned */
,
2
/* float */
1
/* boolean */
,
2
/* integer */
,
2
/* unsigned */
,
2
/* float */
}
}
...
...
src/json.hpp
View file @
57d822b6
...
@@ -29,26 +29,17 @@ SOFTWARE.
...
@@ -29,26 +29,17 @@ SOFTWARE.
#ifndef NLOHMANN_JSON_HPP
#ifndef NLOHMANN_JSON_HPP
#define NLOHMANN_JSON_HPP
#define NLOHMANN_JSON_HPP
#include <algorithm> // all_of, copy, fill, find, for_each, generate_n, none_of, remove, reverse, transform
#include <algorithm> // all_of, find, for_each
#include <array> // array
#include <cassert> // assert
#include <cassert> // assert
#include <ciso646> // and, not, or
#include <ciso646> // and, not, or
#include <clocale> // lconv, localeconv
#include <cmath> // isfinite, labs, ldexp, signbit
#include <cstddef> // nullptr_t, ptrdiff_t, size_t
#include <cstddef> // nullptr_t, ptrdiff_t, size_t
#include <cstdlib> // abort, strtod, strtof, strtold, strtoul, strtoll, strtoull
#include <functional> // hash, less
#include <cstring> // memcpy, strlen
#include <forward_list> // forward_list
#include <functional> // function, hash, less
#include <initializer_list> // initializer_list
#include <initializer_list> // initializer_list
#include <iomanip> // hex
#include <iosfwd> // istream, ostream
#include <iosfwd> // istream, ostream
#include <iterator> // iterator_traits, random_access_iterator_tag
#include <iterator> // advance, begin, back_inserter, bidirectional_iterator_tag, distance, end, inserter, iterator, iterator_traits, next, random_access_iterator_tag, reverse_iterator
#include <limits> // numeric_limits
#include <locale> // locale
#include <numeric> // accumulate
#include <numeric> // accumulate
#include <s
stream> // stringstream
#include <s
tring> // string, stoi, to_string
#include <utility> // declval, forward, m
ake_pair, m
ove, pair, swap
#include <utility> // declval, forward, move, pair, swap
#include "json_fwd.hpp"
#include "json_fwd.hpp"
#include "detail/macro_scope.hpp"
#include "detail/macro_scope.hpp"
...
...
src/json_fwd.hpp
View file @
57d822b6
...
@@ -3,8 +3,8 @@
...
@@ -3,8 +3,8 @@
#include <cstdint> // int64_t, uint64_t
#include <cstdint> // int64_t, uint64_t
#include <map> // map
#include <map> // map
#include <memory> // a
ddressof, allocator, allocator_traits, unique_pt
r
#include <memory> // a
llocato
r
#include <string> //
getline, stoi, string, to_
string
#include <string> // string
#include <vector> // vector
#include <vector> // vector
/*!
/*!
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment