Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
畅游知识海洋
json
提交
5ca84052
J
json
项目概览
畅游知识海洋
/
json
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
J
json
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
5ca84052
编写于
2月 16, 2015
作者:
N
Niels
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
removed unused code and fixed includes
上级
db911401
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
12 addition
and
25 deletion
+12
-25
.gitignore
.gitignore
+0
-4
src/json.hpp
src/json.hpp
+6
-10
src/json.hpp.re2c
src/json.hpp.re2c
+6
-10
test/unit.cpp
test/unit.cpp
+0
-1
未找到文件。
.gitignore
浏览文件 @
5ca84052
.deps
utf8_test
json_unit
html
src/json.hpp
浏览文件 @
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
浏览文件 @
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
浏览文件 @
5ca84052
...
...
@@ -16,7 +16,6 @@ using nlohmann::json;
#include <array>
#include <deque>
#include <forward_list>
#include <iomanip>
#include <list>
#include <map>
#include <set>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录