mirror of
https://github.com/nlohmann/json.git
synced 2024-11-27 16:49:02 +08:00
Fix CI (again) (#4196)
This commit is contained in:
parent
59da644db4
commit
0261bc04d3
2
.github/workflows/codeql-analysis.yml
vendored
2
.github/workflows/codeql-analysis.yml
vendored
@ -32,6 +32,8 @@ jobs:
|
|||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@v2
|
uses: github/codeql-action/init@v2
|
||||||
|
with:
|
||||||
|
languages: c-cpp
|
||||||
|
|
||||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||||
# If this step fails, then you should remove it and run the build manually (see below)
|
# If this step fails, then you should remove it and run the build manually (see below)
|
||||||
|
@ -14,7 +14,7 @@ noexcept(::nlohmann::from_json(std::forward<BasicJsonType>(j), detail::identity_
|
|||||||
-> decltype(::nlohmann::from_json(std::forward<BasicJsonType>(j), detail::identity_tag<TargetType> {}))
|
-> decltype(::nlohmann::from_json(std::forward<BasicJsonType>(j), detail::identity_tag<TargetType> {}))
|
||||||
```
|
```
|
||||||
|
|
||||||
This function is usually called by the [`get()`](../basic_json/get.md) function of the [basic_json](../basic_json)
|
This function is usually called by the [`get()`](../basic_json/get.md) function of the [basic_json](../basic_json/index.md)
|
||||||
class (either explicitly or via the conversion operators).
|
class (either explicitly or via the conversion operators).
|
||||||
|
|
||||||
1. This function is chosen for default-constructible value types.
|
1. This function is chosen for default-constructible value types.
|
||||||
|
@ -7,7 +7,7 @@ static auto to_json(BasicJsonType& j, TargetType && val) noexcept(
|
|||||||
-> decltype(::nlohmann::to_json(j, std::forward<TargetType>(val)), void())
|
-> decltype(::nlohmann::to_json(j, std::forward<TargetType>(val)), void())
|
||||||
```
|
```
|
||||||
|
|
||||||
This function is usually called by the constructors of the [basic_json](../basic_json) class.
|
This function is usually called by the constructors of the [basic_json](../basic_json/index.md) class.
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ constructor.
|
|||||||
|
|
||||||
## See also
|
## See also
|
||||||
|
|
||||||
[List of exceptions](127.0.0.1:8000/home/exceptions/)
|
[List of exceptions](../../home/exceptions.md)
|
||||||
|
|
||||||
## Version history
|
## Version history
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ The class satisfies the following concept requirements:
|
|||||||
- [EqualityComparable](https://en.cppreference.com/w/cpp/named_req/EqualityComparable): JSON values can be compared with
|
- [EqualityComparable](https://en.cppreference.com/w/cpp/named_req/EqualityComparable): JSON values can be compared with
|
||||||
`==`, see [`operator==`](operator_eq.md).
|
`==`, see [`operator==`](operator_eq.md).
|
||||||
- [LessThanComparable](https://en.cppreference.com/w/cpp/named_req/LessThanComparable): JSON values can be compared with
|
- [LessThanComparable](https://en.cppreference.com/w/cpp/named_req/LessThanComparable): JSON values can be compared with
|
||||||
`<`, see [`operator<`](operator_le).
|
`<`, see [`operator<`](operator_le.md).
|
||||||
- [Swappable](https://en.cppreference.com/w/cpp/named_req/Swappable): Any JSON lvalue or rvalue of can be swapped with
|
- [Swappable](https://en.cppreference.com/w/cpp/named_req/Swappable): Any JSON lvalue or rvalue of can be swapped with
|
||||||
any lvalue or rvalue of other compatible types, using unqualified function `swap`.
|
any lvalue or rvalue of other compatible types, using unqualified function `swap`.
|
||||||
- [NullablePointer](https://en.cppreference.com/w/cpp/named_req/NullablePointer): JSON values can be compared against
|
- [NullablePointer](https://en.cppreference.com/w/cpp/named_req/NullablePointer): JSON values can be compared against
|
||||||
@ -88,7 +88,7 @@ The class satisfies the following concept requirements:
|
|||||||
|
|
||||||
## Member types
|
## Member types
|
||||||
|
|
||||||
- [**adl_serializer**](../adl_serializer) - the default serializer
|
- [**adl_serializer**](../adl_serializer/index.md) - the default serializer
|
||||||
- [**value_t**](value_t.md) - the JSON type enumeration
|
- [**value_t**](value_t.md) - the JSON type enumeration
|
||||||
- [**json_pointer**](../json_pointer/index.md) - JSON Pointer implementation
|
- [**json_pointer**](../json_pointer/index.md) - JSON Pointer implementation
|
||||||
- [**json_serializer**](json_serializer.md) - type of the serializer to for conversions from/to JSON
|
- [**json_serializer**](json_serializer.md) - type of the serializer to for conversions from/to JSON
|
||||||
|
@ -17,7 +17,7 @@ using json_serializer = JSONSerializer<T, SFINAE>;
|
|||||||
|
|
||||||
#### Default type
|
#### Default type
|
||||||
|
|
||||||
The default values for `json_serializer` is [`adl_serializer`](../adl_serializer).
|
The default values for `json_serializer` is [`adl_serializer`](../adl_serializer/index.md).
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ replaced by calling [`std::abort`](https://en.cppreference.com/w/cpp/utility/pro
|
|||||||
## See also
|
## See also
|
||||||
|
|
||||||
- [Switch off exceptions](../../home/exceptions.md#switch-off-exceptions) for more information how to switch off exceptions
|
- [Switch off exceptions](../../home/exceptions.md#switch-off-exceptions) for more information how to switch off exceptions
|
||||||
- [JSON_NOEXCEPTION](JSON_NOEXCEPTION) - switch off exceptions
|
- [JSON_NOEXCEPTION](json_noexception.md) - switch off exceptions
|
||||||
|
|
||||||
## Version history
|
## Version history
|
||||||
|
|
||||||
|
@ -245,7 +245,7 @@ integers, and between integers and floating-point values to integers. This beha
|
|||||||
|
|
||||||
The rationale is twofold:
|
The rationale is twofold:
|
||||||
|
|
||||||
1. JSON does not define a number type or precision (see [#json-specification](above)).
|
1. JSON does not define a number type or precision (see above).
|
||||||
2. C++ also allows to silently convert between number types.
|
2. C++ also allows to silently convert between number types.
|
||||||
|
|
||||||
!!! success "Conditional number conversion"
|
!!! success "Conditional number conversion"
|
||||||
|
@ -9,7 +9,7 @@ Throughout this page, we will describe how to compile the example file `example.
|
|||||||
When executed, this program should create output similar to
|
When executed, this program should create output similar to
|
||||||
|
|
||||||
```json
|
```json
|
||||||
--8<-- "../../examples/meta.output"
|
--8<-- "examples/meta.output"
|
||||||
```
|
```
|
||||||
|
|
||||||
## Homebrew
|
## Homebrew
|
||||||
|
@ -9,7 +9,7 @@ repo_url: https://github.com/nlohmann/json
|
|||||||
edit_uri: edit/develop/docs/mkdocs/docs
|
edit_uri: edit/develop/docs/mkdocs/docs
|
||||||
|
|
||||||
# Copyright
|
# Copyright
|
||||||
copyright: Copyright © 2013 - 2022 Niels Lohmann
|
copyright: Copyright © 2013 - 2023 Niels Lohmann
|
||||||
|
|
||||||
# Configuration
|
# Configuration
|
||||||
theme:
|
theme:
|
||||||
@ -270,6 +270,7 @@ nav:
|
|||||||
- 'JSON_HAS_EXPERIMENTAL_FILESYSTEM': api/macros/json_has_filesystem.md
|
- 'JSON_HAS_EXPERIMENTAL_FILESYSTEM': api/macros/json_has_filesystem.md
|
||||||
- 'JSON_HAS_FILESYSTEM': api/macros/json_has_filesystem.md
|
- 'JSON_HAS_FILESYSTEM': api/macros/json_has_filesystem.md
|
||||||
- 'JSON_HAS_RANGES': api/macros/json_has_ranges.md
|
- 'JSON_HAS_RANGES': api/macros/json_has_ranges.md
|
||||||
|
- 'JSON_HAS_STATIC_RTTI': api/macros/json_has_static_rtti.md
|
||||||
- 'JSON_HAS_THREE_WAY_COMPARISON': api/macros/json_has_three_way_comparison.md
|
- 'JSON_HAS_THREE_WAY_COMPARISON': api/macros/json_has_three_way_comparison.md
|
||||||
- 'JSON_NOEXCEPTION': api/macros/json_noexception.md
|
- 'JSON_NOEXCEPTION': api/macros/json_noexception.md
|
||||||
- 'JSON_NO_IO': api/macros/json_no_io.md
|
- 'JSON_NO_IO': api/macros/json_no_io.md
|
||||||
@ -325,8 +326,8 @@ markdown_extensions:
|
|||||||
- pymdownx.critic
|
- pymdownx.critic
|
||||||
- pymdownx.details
|
- pymdownx.details
|
||||||
- pymdownx.emoji:
|
- pymdownx.emoji:
|
||||||
emoji_index: !!python/name:materialx.emoji.twemoji
|
emoji_index: !!python/name:material.extensions.emoji.twemoji
|
||||||
emoji_generator: !!python/name:materialx.emoji.to_svg
|
emoji_generator: !!python/name:material.extensions.emoji.to_svg
|
||||||
- pymdownx.inlinehilite
|
- pymdownx.inlinehilite
|
||||||
- pymdownx.magiclink
|
- pymdownx.magiclink
|
||||||
- pymdownx.mark
|
- pymdownx.mark
|
||||||
|
@ -1,49 +1,49 @@
|
|||||||
Babel==2.11.0
|
Babel==2.13.1
|
||||||
certifi==2022.12.7
|
certifi==2023.7.22
|
||||||
charset-normalizer==2.1.1
|
charset-normalizer==3.3.1
|
||||||
click==8.1.3
|
click==8.1.7
|
||||||
csscompressor==0.9.5
|
csscompressor==0.9.5
|
||||||
future==0.18.3
|
future==0.18.3
|
||||||
ghp-import==2.1.0
|
ghp-import==2.1.0
|
||||||
gitdb==4.0.10
|
gitdb==4.0.11
|
||||||
GitPython==3.1.29
|
GitPython==3.1.40
|
||||||
htmlmin==0.1.12
|
htmlmin==0.1.12
|
||||||
httplib2==0.21.0
|
httplib2==0.22.0
|
||||||
idna==3.4
|
idna==3.4
|
||||||
importlib-metadata==5.1.0
|
importlib-metadata==6.8.0
|
||||||
Jinja2==3.1.2
|
Jinja2==3.1.2
|
||||||
joblib==1.2.0
|
joblib==1.3.2
|
||||||
jsmin==3.0.1
|
jsmin==3.0.1
|
||||||
livereload==2.6.3
|
livereload==2.6.3
|
||||||
lunr==0.6.2
|
lunr==0.7.0.post1
|
||||||
Markdown==3.3.7 # we cannot install a more recent version yet as mkdocs 1.4.2 depends on markdown<3.4
|
Markdown==3.5
|
||||||
markdown-include==0.8.0
|
markdown-include==0.8.1
|
||||||
MarkupSafe==2.1.1
|
MarkupSafe==2.1.3
|
||||||
mergedeep==1.3.4
|
mergedeep==1.3.4
|
||||||
mkdocs==1.4.2
|
mkdocs==1.5.3
|
||||||
mkdocs-git-revision-date-localized-plugin==1.1.0
|
mkdocs-git-revision-date-localized-plugin==1.2.1
|
||||||
mkdocs-material==8.5.11
|
mkdocs-material==9.4.7
|
||||||
mkdocs-material-extensions==1.1.1
|
mkdocs-material-extensions==1.3
|
||||||
mkdocs-minify-plugin==0.6.2
|
mkdocs-minify-plugin==0.7.1
|
||||||
mkdocs-redirects==1.2.0
|
mkdocs-redirects==1.2.1
|
||||||
mkdocs-simple-hooks==0.1.5
|
mkdocs-simple-hooks==0.1.5
|
||||||
nltk==3.8
|
nltk==3.8.1
|
||||||
packaging==22.0
|
packaging==23.2
|
||||||
plantuml==0.3.0
|
plantuml==0.3.0
|
||||||
plantuml-markdown==3.7.3
|
plantuml-markdown==3.9.2
|
||||||
Pygments==2.13.0
|
Pygments==2.16.1
|
||||||
pymdown-extensions==9.9
|
pymdown-extensions==10.3.1
|
||||||
pyparsing==3.0.9
|
pyparsing==3.1.1
|
||||||
python-dateutil==2.8.2
|
python-dateutil==2.8.2
|
||||||
pytz==2022.7
|
pytz==2023.3.post1
|
||||||
PyYAML==6.0
|
PyYAML==6.0.1
|
||||||
pyyaml_env_tag==0.1
|
pyyaml_env_tag==0.1
|
||||||
regex==2022.10.31
|
regex==2023.10.3
|
||||||
requests==2.28.1
|
requests==2.31.0
|
||||||
six==1.16.0
|
six==1.16.0
|
||||||
smmap==5.0.0
|
smmap==5.0.1
|
||||||
tornado==6.2
|
tornado==6.3.3
|
||||||
tqdm==4.64.1
|
tqdm==4.66.1
|
||||||
urllib3==1.26.13
|
urllib3==2.0.7
|
||||||
watchdog==2.2.0
|
watchdog==3.0.0
|
||||||
zipp==3.11.0
|
zipp==3.17.0
|
||||||
|
@ -566,7 +566,7 @@ struct pod_serializer
|
|||||||
// calling get calls from_json, for now, we cannot do this in custom
|
// calling get calls from_json, for now, we cannot do this in custom
|
||||||
// serializers
|
// serializers
|
||||||
nlohmann::from_json(j, value);
|
nlohmann::from_json(j, value);
|
||||||
auto* bytes = static_cast<char*>(static_cast<void*>(&value));
|
auto* bytes = static_cast<char*>(static_cast<void*>(&value)); // NOLINT(bugprone-casting-through-void)
|
||||||
std::memcpy(&t, bytes, sizeof(value));
|
std::memcpy(&t, bytes, sizeof(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -585,7 +585,7 @@ struct pod_serializer
|
|||||||
std::is_pod<U>::value && std::is_class<U>::value, int >::type = 0 >
|
std::is_pod<U>::value && std::is_class<U>::value, int >::type = 0 >
|
||||||
static void to_json(BasicJsonType& j, const T& t) noexcept
|
static void to_json(BasicJsonType& j, const T& t) noexcept
|
||||||
{
|
{
|
||||||
const auto* bytes = static_cast< const unsigned char*>(static_cast<const void*>(&t));
|
const auto* bytes = static_cast< const unsigned char*>(static_cast<const void*>(&t)); // NOLINT(bugprone-casting-through-void)
|
||||||
std::uint64_t value = 0;
|
std::uint64_t value = 0;
|
||||||
std::memcpy(&value, bytes, sizeof(value));
|
std::memcpy(&value, bytes, sizeof(value));
|
||||||
nlohmann::to_json(j, value);
|
nlohmann::to_json(j, value);
|
||||||
|
Loading…
Reference in New Issue
Block a user