MantisBase v0.4.9
Loading...
Searching...
No Matches
script_json.h File Reference

JSON value carried into a Duktape method without going through nlohmann::json. More...

#include <nlohmann/json.hpp>
#include <type_traits>
#include <utility>
Include dependency graph for script_json.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  mb::MbScriptJson

Namespaces

namespace  mb

Detailed Description

JSON value carried into a Duktape method without going through nlohmann::json.

dukglue stores arguments in std::tuple via std::forward_as_tuple. Converting tuple<json&&> to tuple<json> constructs the json from that tuple, and nlohmann::json serializes a tuple as a one-element array. MbScriptJson is not constructible from a tuple, so the argument is moved through unchanged.