Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
json
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
json
Commits
5ca84052
Commit
5ca84052
authored
Feb 16, 2015
by
Niels
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed unused code and fixed includes
parent
db911401
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
25 deletions
+12
-25
.gitignore
.gitignore
+0
-4
json.hpp
src/json.hpp
+6
-10
json.hpp.re2c
src/json.hpp.re2c
+6
-10
unit.cpp
test/unit.cpp
+0
-1
No files found.
.gitignore
View file @
5ca84052
.deps
utf8_test
json_unit
html
src/json.hpp
View file @
5ca84052
...
...
@@ -14,11 +14,13 @@
#include <cmath>
#include <functional>
#include <initializer_list>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits>
#include <map>
#include <memory>
#include <sstream>
#include <string>
#include <type_traits>
#include <utility>
...
...
@@ -139,12 +141,6 @@ class basic_json
/// default constructor (for null values)
json_value
()
=
default
;
/// constructor for objects
json_value
(
object_t
*
v
)
:
object
(
v
)
{}
/// constructor for arrays
json_value
(
array_t
*
v
)
:
array
(
v
)
{}
/// constructor for strings
json_value
(
string_t
*
v
)
:
string
(
v
)
{}
/// constructor for booleans
json_value
(
boolean_t
v
)
:
boolean
(
v
)
{}
/// constructor for numbers (integer)
...
...
@@ -556,10 +552,10 @@ class basic_json
Serialization function for JSON objects. The function tries to mimick Python's
@p json.dumps() function, and currently supports its @p indent parameter.
@param indent
if indent is nonnegative, then array elements and object members
will be pretty-printed with that indent level. An indent level
of 0 will only insert newlines. -1 (the default) selects the
most compact
representation
@param indent
sif indent is nonnegative, then array elements and object
members will be pretty-printed with that indent level. An indent level of 0
will only insert newlines. -1 (the default) selects the most compact
representation
@see https://docs.python.org/2/library/json.html#json.dump
*/
...
...
src/json.hpp.re2c
View file @
5ca84052
...
...
@@ -14,11 +14,13 @@
#include <cmath>
#include <functional>
#include <initializer_list>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits>
#include <map>
#include <memory>
#include <sstream>
#include <string>
#include <type_traits>
#include <utility>
...
...
@@ -139,12 +141,6 @@ class basic_json
/// default constructor (for null values)
json_value() = default;
/// constructor for objects
json_value(object_t* v) : object(v) {}
/// constructor for arrays
json_value(array_t* v) : array(v) {}
/// constructor for strings
json_value(string_t* v) : string(v) {}
/// constructor for booleans
json_value(boolean_t v) : boolean(v) {}
/// constructor for numbers (integer)
...
...
@@ -556,10 +552,10 @@ class basic_json
Serialization function for JSON objects. The function tries to mimick Python's
@p json.dumps() function, and currently supports its @p indent parameter.
@param indent
if indent is nonnegative, then array elements and object members
will be pretty-printed with that indent level. An indent level
of 0 will only insert newlines. -1 (the default) selects the
most compact
representation
@param indent
sif indent is nonnegative, then array elements and object
members will be pretty-printed with that indent level. An indent level of 0
will only insert newlines. -1 (the default) selects the most compact
representation
@see https://docs.python.org/2/library/json.html#json.dump
*/
...
...
test/unit.cpp
View file @
5ca84052
...
...
@@ -16,7 +16,6 @@ using nlohmann::json;
#include <array>
#include <deque>
#include <forward_list>
#include <iomanip>
#include <list>
#include <map>
#include <set>
...
...
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