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
ba3c5e1a
Commit
ba3c5e1a
authored
Nov 29, 2016
by
Niels Lohmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✅
more test cases
parent
c46b4ea9
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
130 additions
and
35 deletions
+130
-35
src/json.hpp
src/json.hpp
+2
-4
src/json.hpp.re2c
src/json.hpp.re2c
+2
-4
test/src/unit-cbor.cpp
test/src/unit-cbor.cpp
+126
-27
No files found.
src/json.hpp
View file @
ba3c5e1a
...
...
@@ -6204,8 +6204,6 @@ class basic_json
static_cast
<
T
>
(
vec
[
current_idx
+
8
]));
}
}
assert
(
false
);
}
static
void
to_msgpack_internal
(
const
basic_json
&
j
,
std
::
vector
<
uint8_t
>&
v
)
...
...
@@ -6452,7 +6450,7 @@ class basic_json
}
else
if
(
j
.
m_value
.
number_integer
<=
UINT64_MAX
)
{
v
.
push_back
(
0x
cf
);
v
.
push_back
(
0x
1b
);
// eight-byte uint64_t
add_to_vector
(
v
,
8
,
j
.
m_value
.
number_integer
);
}
...
...
@@ -6520,7 +6518,7 @@ class basic_json
}
else
if
(
j
.
m_value
.
number_unsigned
<=
0xffffffffffffffff
)
{
v
.
push_back
(
0x
cf
);
v
.
push_back
(
0x
1b
);
// eight-byte uint64_t
add_to_vector
(
v
,
8
,
j
.
m_value
.
number_unsigned
);
}
...
...
src/json.hpp.re2c
View file @
ba3c5e1a
...
...
@@ -6204,8 +6204,6 @@ class basic_json
static_cast<T>(vec[current_idx + 8]));
}
}
assert(false);
}
static void to_msgpack_internal(const basic_json& j, std::vector<uint8_t>& v)
...
...
@@ -6452,7 +6450,7 @@ class basic_json
}
else if (j.m_value.number_integer <= UINT64_MAX)
{
v.push_back(0x
cf
);
v.push_back(0x
1b
);
// eight-byte uint64_t
add_to_vector(v, 8, j.m_value.number_integer);
}
...
...
@@ -6520,7 +6518,7 @@ class basic_json
}
else if (j.m_value.number_unsigned <= 0xffffffffffffffff)
{
v.push_back(0x
cf
);
v.push_back(0x
1b
);
// eight-byte uint64_t
add_to_vector(v, 8, j.m_value.number_unsigned);
}
...
...
test/src/unit-cbor.cpp
View file @
ba3c5e1a
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