Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
json
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
json
Commits
e8bf1f62
Unverified
Commit
e8bf1f62
authored
7 years ago
by
Niels Lohmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added define for library version #948 #943
parent
552d1538
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
8 deletions
+22
-8
develop/json.hpp
develop/json.hpp
+11
-4
src/json.hpp
src/json.hpp
+11
-4
No files found.
develop/json.hpp
View file @
e8bf1f62
...
...
@@ -29,6 +29,10 @@ SOFTWARE.
#ifndef NLOHMANN_JSON_HPP
#define NLOHMANN_JSON_HPP
#define NLOHMANN_JSON_VERSION_MAJOR 3
#define NLOHMANN_JSON_VERSION_MINOR 0
#define NLOHMANN_JSON_VERSION_PATCH 1
#include <algorithm> // all_of, find, for_each
#include <cassert> // assert
#include <ciso646> // and, not, or
...
...
@@ -308,10 +312,13 @@ class basic_json
result
[
"copyright"
]
=
"(C) 2013-2017 Niels Lohmann"
;
result
[
"name"
]
=
"JSON for Modern C++"
;
result
[
"url"
]
=
"https://github.com/nlohmann/json"
;
result
[
"version"
]
=
{
{
"string"
,
"3.0.1"
},
{
"major"
,
3
},
{
"minor"
,
0
},
{
"patch"
,
1
}
};
result
[
"version"
][
"string"
]
=
std
::
to_string
(
NLOHMANN_JSON_VERSION_MAJOR
)
+
"."
+
std
::
to_string
(
NLOHMANN_JSON_VERSION_MINOR
)
+
"."
+
std
::
to_string
(
NLOHMANN_JSON_VERSION_PATCH
);
result
[
"version"
][
"major"
]
=
NLOHMANN_JSON_VERSION_MAJOR
;
result
[
"version"
][
"minor"
]
=
NLOHMANN_JSON_VERSION_MINOR
;
result
[
"version"
][
"patch"
]
=
NLOHMANN_JSON_VERSION_PATCH
;
#ifdef _WIN32
result
[
"platform"
]
=
"win32"
;
...
...
This diff is collapsed.
Click to expand it.
src/json.hpp
View file @
e8bf1f62
...
...
@@ -29,6 +29,10 @@ SOFTWARE.
#ifndef NLOHMANN_JSON_HPP
#define NLOHMANN_JSON_HPP
#define NLOHMANN_JSON_VERSION_MAJOR 3
#define NLOHMANN_JSON_VERSION_MINOR 0
#define NLOHMANN_JSON_VERSION_PATCH 1
#include <algorithm> // all_of, find, for_each
#include <cassert> // assert
#include <ciso646> // and, not, or
...
...
@@ -9885,10 +9889,13 @@ class basic_json
result
[
"copyright"
]
=
"(C) 2013-2017 Niels Lohmann"
;
result
[
"name"
]
=
"JSON for Modern C++"
;
result
[
"url"
]
=
"https://github.com/nlohmann/json"
;
result
[
"version"
]
=
{
{
"string"
,
"3.0.1"
},
{
"major"
,
3
},
{
"minor"
,
0
},
{
"patch"
,
1
}
};
result
[
"version"
][
"string"
]
=
std
::
to_string
(
NLOHMANN_JSON_VERSION_MAJOR
)
+
"."
+
std
::
to_string
(
NLOHMANN_JSON_VERSION_MINOR
)
+
"."
+
std
::
to_string
(
NLOHMANN_JSON_VERSION_PATCH
);
result
[
"version"
][
"major"
]
=
NLOHMANN_JSON_VERSION_MAJOR
;
result
[
"version"
][
"minor"
]
=
NLOHMANN_JSON_VERSION_MINOR
;
result
[
"version"
][
"patch"
]
=
NLOHMANN_JSON_VERSION_PATCH
;
#ifdef _WIN32
result
[
"platform"
]
=
"win32"
;
...
...
This diff is collapsed.
Click to expand it.
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