mirror of
https://github.com/nlohmann/json.git
synced 2025-11-23 19:34:10 +08:00
Simplify module API (#4840)
* Simplify module API Signed-off-by: Miko <110693261+mikomikotaishi@users.noreply.github.com> * Forgot missing newline Signed-off-by: Miko <110693261+mikomikotaishi@users.noreply.github.com> --------- Signed-off-by: Miko <110693261+mikomikotaishi@users.noreply.github.com>
This commit is contained in:
@@ -25,6 +25,7 @@ json data = json::parse(f);
|
||||
|
||||
## Modules do not export macros
|
||||
It should be noted that as modules do not export macros, the `nlohmann.json` module will not export any macros, but rather only the following symbols:
|
||||
|
||||
- `nlohmann::adl_serializer`
|
||||
- `nlohmann::basic_json`
|
||||
- `nlohmann::json`
|
||||
|
||||
@@ -5,18 +5,10 @@ module;
|
||||
export module nlohmann.json;
|
||||
|
||||
export namespace nlohmann {
|
||||
template <typename T = void, typename SFINAE = void>
|
||||
using adl_serializer = ::nlohmann::adl_serializer<T, SFINAE>;
|
||||
|
||||
using basic_json = ::nlohmann::basic_json<>;
|
||||
|
||||
using json = ::nlohmann::json;
|
||||
|
||||
template <typename RefStringType>
|
||||
using json_pointer = ::nlohmann::json_pointer<RefStringType>;
|
||||
|
||||
using ::nlohmann::adl_serializer;
|
||||
using ::nlohmann::basic_json;
|
||||
using ::nlohmann::json;
|
||||
using ::nlohmann::json_pointer;
|
||||
using ::nlohmann::ordered_json;
|
||||
|
||||
template <class Key, class T, class IgnoredLess, class Allocator>
|
||||
using ordered_map = ::nlohmann::ordered_map<Key, T, IgnoredLess, Allocator>;
|
||||
using ::nlohmann::ordered_map;
|
||||
} // namespace nlohmann
|
||||
|
||||
Reference in New Issue
Block a user