Merge branch 'develop' of https://github.com/nlohmann/json into clean_doxygen
This commit is contained in:
commit
59bce783be
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
- [Design goals](#design-goals)
|
- [Design goals](#design-goals)
|
||||||
- [Sponsors](#sponsors)
|
- [Sponsors](#sponsors)
|
||||||
- [Support](#support) ([documentation](https://json.nlohmann.me), [FAQ](http://127.0.0.1:8000/home/faq/), [discussions](https://github.com/nlohmann/json/discussions), [API](https://json.nlohmann.me/api/basic_json/), [bug issues](https://github.com/nlohmann/json/issues))
|
- [Support](#support) ([documentation](https://json.nlohmann.me), [FAQ](https://json.nlohmann.me/home/faq/), [discussions](https://github.com/nlohmann/json/discussions), [API](https://json.nlohmann.me/api/basic_json/), [bug issues](https://github.com/nlohmann/json/issues))
|
||||||
- [Examples](#examples)
|
- [Examples](#examples)
|
||||||
- [JSON as first-class data type](#json-as-first-class-data-type)
|
- [JSON as first-class data type](#json-as-first-class-data-type)
|
||||||
- [Serialization / Deserialization](#serialization--deserialization)
|
- [Serialization / Deserialization](#serialization--deserialization)
|
||||||
|
|||||||
@ -25,7 +25,7 @@ However, you can pass set parameter `ignore_comments` to `#!c true` in the parse
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
When calling `parse` without additional argument, a parse error exception is thrown. If `skip_comments` is set to `#! true`, the comments are skipped during parsing:
|
When calling `parse` without additional argument, a parse error exception is thrown. If `ignore_comments` is set to `#! true`, the comments are ignored during parsing:
|
||||||
|
|
||||||
```cpp
|
```cpp
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
@ -55,7 +55,7 @@ However, you can pass set parameter `ignore_comments` to `#!c true` in the parse
|
|||||||
json j = json::parse(s,
|
json j = json::parse(s,
|
||||||
/* callback */ nullptr,
|
/* callback */ nullptr,
|
||||||
/* allow exceptions */ true,
|
/* allow exceptions */ true,
|
||||||
/* skip_comments */ true);
|
/* ignore_comments */ true);
|
||||||
std::cout << j.dump(2) << '\n';
|
std::cout << j.dump(2) << '\n';
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@ -80,4 +80,4 @@ However, you can pass set parameter `ignore_comments` to `#!c true` in the parse
|
|||||||
"Neptune"
|
"Neptune"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
@ -733,15 +733,15 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
iterator set_parents(iterator it, typename iterator::difference_type count)
|
iterator set_parents(iterator it, typename iterator::difference_type count_set_parents)
|
||||||
{
|
{
|
||||||
#if JSON_DIAGNOSTICS
|
#if JSON_DIAGNOSTICS
|
||||||
for (typename iterator::difference_type i = 0; i < count; ++i)
|
for (typename iterator::difference_type i = 0; i < count_set_parents; ++i)
|
||||||
{
|
{
|
||||||
(it + i)->m_parent = this;
|
(it + i)->m_parent = this;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
static_cast<void>(count);
|
static_cast<void>(count_set_parents);
|
||||||
#endif
|
#endif
|
||||||
return it;
|
return it;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -17803,15 +17803,15 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
iterator set_parents(iterator it, typename iterator::difference_type count)
|
iterator set_parents(iterator it, typename iterator::difference_type count_set_parents)
|
||||||
{
|
{
|
||||||
#if JSON_DIAGNOSTICS
|
#if JSON_DIAGNOSTICS
|
||||||
for (typename iterator::difference_type i = 0; i < count; ++i)
|
for (typename iterator::difference_type i = 0; i < count_set_parents; ++i)
|
||||||
{
|
{
|
||||||
(it + i)->m_parent = this;
|
(it + i)->m_parent = this;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
static_cast<void>(count);
|
static_cast<void>(count_set_parents);
|
||||||
#endif
|
#endif
|
||||||
return it;
|
return it;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user