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
9105f551
Unverified
Commit
9105f551
authored
Dec 31, 2021
by
Niels Lohmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🔀
merge develop branch
parent
9dfe422e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
0 deletions
+46
-0
include/nlohmann/json.hpp
include/nlohmann/json.hpp
+23
-0
single_include/nlohmann/json.hpp
single_include/nlohmann/json.hpp
+23
-0
No files found.
include/nlohmann/json.hpp
View file @
9105f551
...
@@ -3939,6 +3939,29 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
...
@@ -3939,6 +3939,29 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
binary_writer
<
char
>
(
o
).
write_bson
(
j
);
binary_writer
<
char
>
(
o
).
write_bson
(
j
);
}
}
/// @brief create a BSON serialization of a given JSON value
/// @sa https://json.nlohmann.me/api/basic_json/to_bon8/
static
std
::
vector
<
std
::
uint8_t
>
to_bon8
(
const
basic_json
&
j
)
{
std
::
vector
<
std
::
uint8_t
>
result
;
to_bon8
(
j
,
result
);
return
result
;
}
/// @brief create a BSON serialization of a given JSON value
/// @sa https://json.nlohmann.me/api/basic_json/to_bon8/
static
void
to_bon8
(
const
basic_json
&
j
,
detail
::
output_adapter
<
std
::
uint8_t
>
o
)
{
binary_writer
<
std
::
uint8_t
>
(
o
).
write_bon8
(
j
);
}
/// @brief create a BSON serialization of a given JSON value
/// @sa https://json.nlohmann.me/api/basic_json/to_bon8/
static
void
to_bon8
(
const
basic_json
&
j
,
detail
::
output_adapter
<
char
>
o
)
{
binary_writer
<
char
>
(
o
).
write_bon8
(
j
);
}
/// @brief create a JSON value from an input in CBOR format
/// @brief create a JSON value from an input in CBOR format
/// @sa https://json.nlohmann.me/api/basic_json/from_cbor/
/// @sa https://json.nlohmann.me/api/basic_json/from_cbor/
template
<
typename
InputType
>
template
<
typename
InputType
>
...
...
single_include/nlohmann/json.hpp
View file @
9105f551
...
@@ -21721,6 +21721,29 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
...
@@ -21721,6 +21721,29 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
binary_writer
<
char
>
(
o
).
write_bson
(
j
);
binary_writer
<
char
>
(
o
).
write_bson
(
j
);
}
}
/// @brief create a BSON serialization of a given JSON value
/// @sa https://json.nlohmann.me/api/basic_json/to_bon8/
static
std
::
vector
<
std
::
uint8_t
>
to_bon8
(
const
basic_json
&
j
)
{
std
::
vector
<
std
::
uint8_t
>
result
;
to_bon8
(
j
,
result
);
return
result
;
}
/// @brief create a BSON serialization of a given JSON value
/// @sa https://json.nlohmann.me/api/basic_json/to_bon8/
static
void
to_bon8
(
const
basic_json
&
j
,
detail
::
output_adapter
<
std
::
uint8_t
>
o
)
{
binary_writer
<
std
::
uint8_t
>
(
o
).
write_bon8
(
j
);
}
/// @brief create a BSON serialization of a given JSON value
/// @sa https://json.nlohmann.me/api/basic_json/to_bon8/
static
void
to_bon8
(
const
basic_json
&
j
,
detail
::
output_adapter
<
char
>
o
)
{
binary_writer
<
char
>
(
o
).
write_bon8
(
j
);
}
/// @brief create a JSON value from an input in CBOR format
/// @brief create a JSON value from an input in CBOR format
/// @sa https://json.nlohmann.me/api/basic_json/from_cbor/
/// @sa https://json.nlohmann.me/api/basic_json/from_cbor/
template
<
typename
InputType
>
template
<
typename
InputType
>
...
...
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