Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
畅游知识海洋
json
提交
13e6f6c5
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,体验更适合开发者的 AI 搜索 >>
未验证
提交
13e6f6c5
编写于
4月 24, 2022
作者:
N
Niels Lohmann
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
📝
add titles to more admonitions
上级
7f76374b
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
14 addition
and
14 deletion
+14
-14
doc/mkdocs/docs/api/basic_json/basic_json.md
doc/mkdocs/docs/api/basic_json/basic_json.md
+1
-1
doc/mkdocs/docs/api/basic_json/get.md
doc/mkdocs/docs/api/basic_json/get.md
+1
-1
doc/mkdocs/docs/api/basic_json/get_ptr.md
doc/mkdocs/docs/api/basic_json/get_ptr.md
+1
-1
doc/mkdocs/docs/api/basic_json/get_ref.md
doc/mkdocs/docs/api/basic_json/get_ref.md
+1
-1
doc/mkdocs/docs/api/basic_json/is_discarded.md
doc/mkdocs/docs/api/basic_json/is_discarded.md
+2
-2
doc/mkdocs/docs/api/basic_json/items.md
doc/mkdocs/docs/api/basic_json/items.md
+1
-1
doc/mkdocs/docs/api/basic_json/operator[].md
doc/mkdocs/docs/api/basic_json/operator[].md
+1
-1
doc/mkdocs/docs/api/basic_json/value.md
doc/mkdocs/docs/api/basic_json/value.md
+1
-1
doc/mkdocs/docs/api/macros/json_diagnostics.md
doc/mkdocs/docs/api/macros/json_diagnostics.md
+1
-1
doc/mkdocs/docs/api/macros/json_skip_library_version_check.md
...mkdocs/docs/api/macros/json_skip_library_version_check.md
+1
-1
doc/mkdocs/scripts/check_structure.py
doc/mkdocs/scripts/check_structure.py
+3
-3
未找到文件。
doc/mkdocs/docs/api/basic_json/basic_json.md
浏览文件 @
13e6f6c5
...
...
@@ -256,7 +256,7 @@ basic_json(basic_json&& other) noexcept;
cases are detected; see the description of the exceptions above. A violation of this precondition yields
undefined behavior.
!!! danger
!!! danger
"Runtime assertion"
A precondition is enforced with a [runtime assertion](../../features/assertions.md).
...
...
doc/mkdocs/docs/api/basic_json/get.md
浏览文件 @
13e6f6c5
...
...
@@ -90,7 +90,7 @@ Depends on what `json_serializer<ValueType>` `from_json()` method throws
## Notes
!!!
warning
!!!
danger "Undefined behavior"
Writing data to the pointee (overload 3) of the result yields an undefined state.
...
...
doc/mkdocs/docs/api/basic_json/get_ptr.md
浏览文件 @
13e6f6c5
...
...
@@ -33,7 +33,7 @@ Constant.
## Notes
!!!
warning
!!!
danger "Undefined behavior"
Writing data to the pointee of the result yields an undefined state.
...
...
doc/mkdocs/docs/api/basic_json/get_ref.md
浏览文件 @
13e6f6c5
...
...
@@ -38,7 +38,7 @@ Constant.
## Notes
!!!
warning
!!!
danger "Undefined behavior"
Writing data to the referee of the result yields an undefined state.
...
...
doc/mkdocs/docs/api/basic_json/is_discarded.md
浏览文件 @
13e6f6c5
...
...
@@ -24,7 +24,7 @@ Constant.
## Notes
!!! note
!!! note
"Comparisons"
Discarded values are never compared equal with [`operator==`](operator_eq.md). That is, checking whether a JSON
value `j` is discarded will only work via:
...
...
@@ -41,7 +41,7 @@ Constant.
will always be `#!cpp false`.
!!! note
!!! note
"Removal during parsing with callback functions"
When a value is discarded by a callback function (see [`parser_callback_t`](parser_callback_t.md)) during parsing,
then it is removed when it is part of a structured value. For instance, if the second value of an array is discarded,
...
...
doc/mkdocs/docs/api/basic_json/items.md
浏览文件 @
13e6f6c5
...
...
@@ -63,7 +63,7 @@ Constant.
When iterating over an array,
`key()`
will return the index of the element as string (see example). For primitive types
(e.g., numbers),
`key()`
returns an empty string.
!!!
warning
!!!
danger "Lifetime issues"
Using `items()` on temporary objects is dangerous. Make sure the object's lifetime exceeds the iteration. See
<https://github.com/nlohmann/json/issues/2040> for more information.
...
...
doc/mkdocs/docs/api/basic_json/operator[].md
浏览文件 @
13e6f6c5
...
...
@@ -74,7 +74,7 @@ Strong exception safety: if an exception occurs, the original value stays intact
## Notes
!!! danger
!!! danger
"Undefined behavior"
1. If the element with key `idx` does not exist, the behavior is undefined.
2. If the element with key `key` does not exist, the behavior is undefined and is **guarded by a
...
...
doc/mkdocs/docs/api/basic_json/value.md
浏览文件 @
13e6f6c5
...
...
@@ -36,7 +36,7 @@ ValueType value(const json_pointer& ptr,
}
```
!!! note
!!! note
"Differences to
`at`
and
`operator[]`
"
- Unlike [`at`](at.md), this function does not throw if the given `key`/`ptr` was not found.
- Unlike [`operator[]`](operator[].md), this function does not implicitly add an element to the position defined by
...
...
doc/mkdocs/docs/api/macros/json_diagnostics.md
浏览文件 @
13e6f6c5
...
...
@@ -26,7 +26,7 @@ When the macro is not defined, the library will define it to its default value.
## Notes
!!!
warning
!!!
danger "ODR violation"
As this macro changes the definition of the `basic_json` object, it MUST be defined in the same way globally, even
across different compilation units; DO NOT link together code compiled with different definitions of
...
...
doc/mkdocs/docs/api/macros/json_skip_library_version_check.md
浏览文件 @
13e6f6c5
...
...
@@ -17,7 +17,7 @@ By default, the macro is not defined.
## Notes
!!!
warning
!!!
danger "ABI compatibility"
Mixing different library versions in the same code can be a problem as the different versions may not be ABI
compatible.
...
...
doc/mkdocs/scripts/check_structure.py
浏览文件 @
13e6f6c5
...
...
@@ -100,9 +100,9 @@ def check_structure():
if
line
==
''
and
previous_line
==
''
:
report
(
'whitespace/blank_lines'
,
f
'
{
file
}
:
{
lineno
}
-
{
lineno
+
1
}
'
,
'consecutive blank lines'
)
# check that admonitions have titles
untitled_admonition
=
re
.
match
(
r
'^(\?\?\?|!!!) (
note|info
)$'
,
line
)
if
untitled_admonition
:
# check that
non-example
admonitions have titles
untitled_admonition
=
re
.
match
(
r
'^(\?\?\?|!!!) (
[^ ]+
)$'
,
line
)
if
untitled_admonition
and
untitled_admonition
.
group
(
2
)
!=
'example'
:
report
(
'style/admonition_title'
,
f
'
{
file
}
:
{
lineno
}
'
,
f
'"
{
untitled_admonition
.
group
(
2
)
}
" admonitions should have a title'
)
previous_line
=
line
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录