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
6f8e36ac
Commit
6f8e36ac
authored
Dec 06, 2015
by
Niels
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes #136
parent
c0132232
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
1 deletion
+39
-1
README.md
README.md
+1
-0
src/json.hpp
src/json.hpp
+19
-1
src/json.hpp.re2c
src/json.hpp.re2c
+19
-0
No files found.
README.md
View file @
6f8e36ac
...
...
@@ -380,6 +380,7 @@ I deeply appreciate the help of the following people.
-
[
Huu Nguyen
](
https://github.com/whoshuu
)
correct a variable name in the documentation.
-
[
Silverweed
](
https://github.com/silverweed
)
overloaded
`parse()`
to accept an rvalue reference.
-
[
dariomt
](
https://github.com/dariomt
)
fixed a subtlety in MSVC type support.
-
[
ZahlGraf
](
https://github.com/ZahlGraf
)
added a workaround that allows compilation using Android NDK.
Thanks a lot for helping out!
...
...
src/json.hpp
View file @
6f8e36ac
...
...
@@ -70,6 +70,25 @@ Class @ref nlohmann::basic_json is a good entry point for the documentation.
using
ssize_t
=
SSIZE_T
;
#endif
// workaround for Android NDK (see https://github.com/nlohmann/json/issues/136)
#ifdef __ANDROID__
namespace
std
{
template
<
typename
T
>
std
::
string
to_string
(
T
v
)
{
std
::
ostringstream
ss
;
ss
<<
v
;
return
ss
.
str
();
}
inline
long
double
strtold
(
const
char
*
str
,
char
**
str_end
)
{
return
strtod
(
str
,
str_end
);
}
}
#endif
/*!
@brief namespace for Niels Lohmann
@see https://github.com/nlohmann
...
...
@@ -6009,7 +6028,6 @@ class basic_json
64
,
64
,
64
,
64
,
64
,
64
,
64
,
64
,
64
,
64
,
64
,
64
,
64
,
64
,
64
,
64
,
};
if
((
m_limit
-
m_cursor
)
<
5
)
{
yyfill
();
// LCOV_EXCL_LINE;
...
...
src/json.hpp.re2c
View file @
6f8e36ac
...
...
@@ -70,6 +70,25 @@ Class @ref nlohmann::basic_json is a good entry point for the documentation.
using ssize_t = SSIZE_T;
#endif
// workaround for Android NDK (see https://github.com/nlohmann/json/issues/136)
#ifdef __ANDROID__
namespace std
{
template <typename T>
std::string to_string(T v)
{
std::ostringstream ss;
ss << v;
return ss.str();
}
inline long double strtold(const char* str, char** str_end)
{
return strtod(str, str_end);
}
}
#endif
/*!
@brief namespace for Niels Lohmann
@see https://github.com/nlohmann
...
...
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