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
27011e37
Unverified
Commit
27011e37
authored
Mar 15, 2019
by
Niels Lohmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🚨
fixed warnings
parent
0c65ba96
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
58 additions
and
44 deletions
+58
-44
to_json.hpp
include/nlohmann/detail/conversions/to_json.hpp
+2
-0
json_sax.hpp
include/nlohmann/detail/input/json_sax.hpp
+4
-3
lexer.hpp
include/nlohmann/detail/input/lexer.hpp
+1
-0
parser.hpp
include/nlohmann/detail/input/parser.hpp
+1
-0
position_t.hpp
include/nlohmann/detail/input/position_t.hpp
+2
-2
iteration_proxy.hpp
include/nlohmann/detail/iterators/iteration_proxy.hpp
+1
-1
iterator_traits.hpp
include/nlohmann/detail/iterators/iterator_traits.hpp
+2
-2
json_pointer.hpp
include/nlohmann/detail/json_pointer.hpp
+1
-0
macro_scope.hpp
include/nlohmann/detail/macro_scope.hpp
+2
-0
is_sax.hpp
include/nlohmann/detail/meta/is_sax.hpp
+1
-0
binary_writer.hpp
include/nlohmann/detail/output/binary_writer.hpp
+1
-0
serializer.hpp
include/nlohmann/detail/output/serializer.hpp
+1
-0
value_t.hpp
include/nlohmann/detail/value_t.hpp
+1
-0
json.hpp
include/nlohmann/json.hpp
+6
-11
json_fwd.hpp
include/nlohmann/json_fwd.hpp
+3
-3
json.hpp
single_include/nlohmann/json.hpp
+29
-22
No files found.
include/nlohmann/detail/conversions/to_json.hpp
View file @
27011e37
#pragma once
#include <algorithm> // copy
#include <ciso646> // or, and, not
#include <iterator> // begin, end
#include <string> // string
#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/nlohmann/detail/input/json_sax.hpp
View file @
27011e37
#pragma once
#include <cassert>
#include <cassert>
// assert
#include <cstddef>
#include <string>
#include <vector>
#include <string> // string
#include <utility> // move
#include <vector> // vector
#include <nlohmann/detail/exceptions.hpp>
#include <nlohmann/detail/macro_scope.hpp>
...
...
include/nlohmann/detail/input/lexer.hpp
View file @
27011e37
...
...
@@ -6,6 +6,7 @@
#include <cstdio> // snprintf
#include <initializer_list> // initializer_list
#include <string> // char_traits, string
#include <utility> // move
#include <vector> // vector
#include <nlohmann/detail/macro_scope.hpp>
...
...
include/nlohmann/detail/input/parser.hpp
View file @
27011e37
...
...
@@ -6,6 +6,7 @@
#include <functional> // function
#include <string> // string
#include <utility> // move
#include <vector> // vector
#include <nlohmann/detail/exceptions.hpp>
#include <nlohmann/detail/macro_scope.hpp>
...
...
include/nlohmann/detail/input/position_t.hpp
View file @
27011e37
...
...
@@ -23,5 +23,5 @@ struct position_t
}
};
}
}
}
// namespace detail
}
// namespace nlohmann
include/nlohmann/detail/iterators/iteration_proxy.hpp
View file @
27011e37
...
...
@@ -167,4 +167,4 @@ class tuple_element<N, ::nlohmann::detail::iteration_proxy_value<IteratorType >>
#if defined(__clang__)
#pragma clang diagnostic pop
#endif
}
}
// namespace std
include/nlohmann/detail/iterators/iterator_traits.hpp
View file @
27011e37
...
...
@@ -45,5 +45,5 @@ struct iterator_traits<T*, enable_if_t<std::is_object<T>::value>> {
using
pointer
=
T
*
;
using
reference
=
T
&
;
};
}
}
}
// namespace detail
}
// namespace nlohmann
include/nlohmann/detail/json_pointer.hpp
View file @
27011e37
...
...
@@ -4,6 +4,7 @@
#include <cassert> // assert
#include <numeric> // accumulate
#include <string> // string
#include <utility> // move
#include <vector> // vector
#include <nlohmann/detail/macro_scope.hpp>
...
...
include/nlohmann/detail/macro_scope.hpp
View file @
27011e37
#pragma once
#include <utility> // pair
// This file contains all internal macro definitions
// You MUST include macro_unscope.hpp at the end of json.hpp to undef all of them
...
...
include/nlohmann/detail/meta/is_sax.hpp
View file @
27011e37
...
...
@@ -2,6 +2,7 @@
#include <cstdint> // size_t
#include <utility> // declval
#include <string> // string
#include <nlohmann/detail/meta/detected.hpp>
#include <nlohmann/detail/meta/type_traits.hpp>
...
...
include/nlohmann/detail/output/binary_writer.hpp
View file @
27011e37
...
...
@@ -5,6 +5,7 @@
#include <cstdint> // uint8_t, uint16_t, uint32_t, uint64_t
#include <cstring> // memcpy
#include <limits> // numeric_limits
#include <string> // string
#include <nlohmann/detail/input/binary_reader.hpp>
#include <nlohmann/detail/output/output_adapters.hpp>
...
...
include/nlohmann/detail/output/serializer.hpp
View file @
27011e37
...
...
@@ -12,6 +12,7 @@
#include <limits> // numeric_limits
#include <string> // string
#include <type_traits> // is_same
#include <utility> // move
#include <nlohmann/detail/exceptions.hpp>
#include <nlohmann/detail/conversions/to_chars.hpp>
...
...
include/nlohmann/detail/value_t.hpp
View file @
27011e37
...
...
@@ -4,6 +4,7 @@
#include <ciso646> // and
#include <cstddef> // size_t
#include <cstdint> // uint8_t
#include <string> // string
namespace
nlohmann
{
...
...
include/nlohmann/json.hpp
View file @
27011e37
...
...
@@ -27,8 +27,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#ifndef
NLOHMANN_JSON_HPP
#define
NLOHMANN_JSON_HPP
#ifndef
INCLUDE_NLOHMANN_JSON_HPP_
#define
INCLUDE_NLOHMANN_JSON_HPP_
#define NLOHMANN_JSON_VERSION_MAJOR 3
#define NLOHMANN_JSON_VERSION_MINOR 5
...
...
@@ -42,9 +42,11 @@ SOFTWARE.
#include <initializer_list> // initializer_list
#include <iosfwd> // istream, ostream
#include <iterator> // random_access_iterator_tag
#include <memory> // unique_ptr
#include <numeric> // accumulate
#include <string> // string, stoi, to_string
#include <utility> // declval, forward, move, pair, swap
#include <vector> // vector
#include <nlohmann/json_fwd.hpp>
#include <nlohmann/detail/macro_scope.hpp>
...
...
@@ -3980,14 +3982,7 @@ class basic_json
template
<
typename
KeyT
>
bool
contains
(
KeyT
&&
key
)
const
{
if
(
is_object
())
{
return
(
m_value
.
object
->
find
(
std
::
forward
<
KeyT
>
(
key
))
!=
m_value
.
object
->
end
());
}
else
{
return
false
;
}
return
(
is_object
()
and
m_value
.
object
->
find
(
std
::
forward
<
KeyT
>
(
key
))
!=
m_value
.
object
->
end
());
}
/// @}
...
...
@@ -8052,4 +8047,4 @@ inline nlohmann::json::json_pointer operator "" _json_pointer(const char* s, std
#include <nlohmann/detail/macro_unscope.hpp>
#endif
#endif
// INCLUDE_NLOHMANN_JSON_HPP_
include/nlohmann/json_fwd.hpp
View file @
27011e37
#ifndef
NLOHMANN_JSON_FWD_HPP
#define
NLOHMANN_JSON_FWD_HPP
#ifndef
INCLUDE_NLOHMANN_JSON_FWD_HPP_
#define
INCLUDE_NLOHMANN_JSON_FWD_HPP_
#include <cstdint> // int64_t, uint64_t
#include <map> // map
...
...
@@ -61,4 +61,4 @@ uses the standard template types.
using
json
=
basic_json
<>
;
}
// namespace nlohmann
#endif
#endif
// INCLUDE_NLOHMANN_JSON_FWD_HPP_
single_include/nlohmann/json.hpp
View file @
27011e37
...
...
@@ -27,8 +27,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#ifndef
NLOHMANN_JSON_HPP
#define
NLOHMANN_JSON_HPP
#ifndef
INCLUDE_NLOHMANN_JSON_HPP_
#define
INCLUDE_NLOHMANN_JSON_HPP_
#define NLOHMANN_JSON_VERSION_MAJOR 3
#define NLOHMANN_JSON_VERSION_MINOR 5
...
...
@@ -42,13 +42,15 @@ SOFTWARE.
#include <initializer_list> // initializer_list
#include <iosfwd> // istream, ostream
#include <iterator> // random_access_iterator_tag
#include <memory> // unique_ptr
#include <numeric> // accumulate
#include <string> // string, stoi, to_string
#include <utility> // declval, forward, move, pair, swap
#include <vector> // vector
// #include <nlohmann/json_fwd.hpp>
#ifndef
NLOHMANN_JSON_FWD_HPP
#define
NLOHMANN_JSON_FWD_HPP
#ifndef
INCLUDE_NLOHMANN_JSON_FWD_HPP_
#define
INCLUDE_NLOHMANN_JSON_FWD_HPP_
#include <cstdint> // int64_t, uint64_t
#include <map> // map
...
...
@@ -110,11 +112,13 @@ uses the standard template types.
using
json
=
basic_json
<>
;
}
// namespace nlohmann
#endif
#endif
// INCLUDE_NLOHMANN_JSON_FWD_HPP_
// #include <nlohmann/detail/macro_scope.hpp>
#include <utility> // pair
// This file contains all internal macro definitions
// You MUST include macro_unscope.hpp at the end of json.hpp to undef all of them
...
...
@@ -403,8 +407,8 @@ struct iterator_traits<T*, enable_if_t<std::is_object<T>::value>>
using
pointer
=
T
*
;
using
reference
=
T
&
;
};
}
}
}
// namespace detail
}
// namespace nlohmann
// #include <nlohmann/detail/meta/cpp_future.hpp>
...
...
@@ -839,8 +843,8 @@ struct position_t
}
};
}
}
}
// namespace detail
}
// namespace nlohmann
namespace
nlohmann
...
...
@@ -1192,6 +1196,7 @@ class other_error : public exception
#include <ciso646> // and
#include <cstddef> // size_t
#include <cstdint> // uint8_t
#include <string> // string
namespace
nlohmann
{
...
...
@@ -1643,8 +1648,10 @@ constexpr const auto& from_json = detail::static_const<detail::from_json_fn>::va
// #include <nlohmann/detail/conversions/to_json.hpp>
#include <algorithm> // copy
#include <ciso646> // or, and, not
#include <iterator> // begin, end
#include <string> // string
#include <tuple> // tuple, get
#include <type_traits> // is_same, is_constructible, is_floating_point, is_enum, underlying_type
#include <utility> // move, forward, declval, pair
...
...
@@ -1829,7 +1836,7 @@ class tuple_element<N, ::nlohmann::detail::iteration_proxy_value<IteratorType >>
#if defined(__clang__)
#pragma clang diagnostic pop
#endif
}
}
// namespace std
namespace
nlohmann
...
...
@@ -2595,6 +2602,7 @@ class input_adapter
#include <cstdio> // snprintf
#include <initializer_list> // initializer_list
#include <string> // char_traits, string
#include <utility> // move
#include <vector> // vector
// #include <nlohmann/detail/macro_scope.hpp>
...
...
@@ -4106,6 +4114,7 @@ scan_number_done:
#include <functional> // function
#include <string> // string
#include <utility> // move
#include <vector> // vector
// #include <nlohmann/detail/exceptions.hpp>
...
...
@@ -4116,6 +4125,7 @@ scan_number_done:
#include <cstdint> // size_t
#include <utility> // declval
#include <string> // string
// #include <nlohmann/detail/meta/detected.hpp>
...
...
@@ -4261,10 +4271,11 @@ struct is_sax_static_asserts
// #include <nlohmann/detail/input/json_sax.hpp>
#include <cassert>
#include <cassert>
// assert
#include <cstddef>
#include <string>
#include <vector>
#include <string> // string
#include <utility> // move
#include <vector> // vector
// #include <nlohmann/detail/exceptions.hpp>
...
...
@@ -8472,6 +8483,7 @@ class binary_reader
#include <cstdint> // uint8_t, uint16_t, uint32_t, uint64_t
#include <cstring> // memcpy
#include <limits> // numeric_limits
#include <string> // string
// #include <nlohmann/detail/input/binary_reader.hpp>
...
...
@@ -9822,6 +9834,7 @@ class binary_writer
#include <limits> // numeric_limits
#include <string> // string
#include <type_traits> // is_same
#include <utility> // move
// #include <nlohmann/detail/exceptions.hpp>
...
...
@@ -11821,6 +11834,7 @@ class json_ref
#include <cassert> // assert
#include <numeric> // accumulate
#include <string> // string
#include <utility> // move
#include <vector> // vector
// #include <nlohmann/detail/macro_scope.hpp>
...
...
@@ -16555,14 +16569,7 @@ class basic_json
template
<
typename
KeyT
>
bool
contains
(
KeyT
&&
key
)
const
{
if
(
is_object
())
{
return
(
m_value
.
object
->
find
(
std
::
forward
<
KeyT
>
(
key
))
!=
m_value
.
object
->
end
());
}
else
{
return
false
;
}
return
(
is_object
()
and
m_value
.
object
->
find
(
std
::
forward
<
KeyT
>
(
key
))
!=
m_value
.
object
->
end
());
}
/// @}
...
...
@@ -20651,4 +20658,4 @@ inline nlohmann::json::json_pointer operator "" _json_pointer(const char* s, std
#undef NLOHMANN_BASIC_JSON_TPL
#endif
#endif
// INCLUDE_NLOHMANN_JSON_HPP_
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