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
3ed059f6
Unverified
Commit
3ed059f6
authored
May 16, 2020
by
Niels Lohmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
⏪
revert faulty changes
parent
bc1886fb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
8 deletions
+4
-8
include/nlohmann/detail/output/binary_writer.hpp
include/nlohmann/detail/output/binary_writer.hpp
+2
-4
single_include/nlohmann/json.hpp
single_include/nlohmann/json.hpp
+2
-4
No files found.
include/nlohmann/detail/output/binary_writer.hpp
View file @
3ed059f6
...
...
@@ -630,9 +630,7 @@ class binary_writer
// step 1.5: if this is an ext type, write the subtype
if
(
use_ext
)
{
std
::
uint8_t
subtype
;
write_number
(
subtype
);
j
.
m_value
.
binary
->
set_subtype
(
subtype
);
write_number
(
j
.
m_value
.
binary
->
subtype
());
}
// step 2: write the byte string
...
...
@@ -1087,7 +1085,7 @@ class binary_writer
write_bson_entry_header
(
name
,
0x05
);
write_number
<
std
::
int32_t
,
true
>
(
static_cast
<
std
::
int32_t
>
(
value
.
size
()));
write_number
(
value
.
has_subtype
()
?
value
.
subtype
()
:
0x00
);
write_number
(
value
.
has_subtype
()
?
value
.
subtype
()
:
std
::
uint8_t
(
0x00
)
);
oa
->
write_characters
(
reinterpret_cast
<
const
CharType
*>
(
value
.
data
()),
value
.
size
());
}
...
...
single_include/nlohmann/json.hpp
View file @
3ed059f6
...
...
@@ -12637,9 +12637,7 @@ class binary_writer
// step 1.5: if this is an ext type, write the subtype
if (use_ext)
{
std
::
uint8_t
subtype
;
write_number
(
subtype
);
j
.
m_value
.
binary
->
set_subtype
(
subtype
);
write_number(j.m_value.binary->subtype());
}
// step 2: write the byte string
...
...
@@ -13094,7 +13092,7 @@ class binary_writer
write_bson_entry_header(name, 0x05);
write_number<std::int32_t, true>(static_cast<std::int32_t>(value.size()));
write_number
(
value
.
has_subtype
()
?
value
.
subtype
()
:
0x00
);
write_number(value.has_subtype() ? value.subtype() :
std::uint8_t(0x00)
);
oa->write_characters(reinterpret_cast<const CharType*>(value.data()), value.size());
}
...
...
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