$darkmode
nlohmann::adl_serializer< sol::object > Struct Reference

#include <sol.hpp>

Static Public Member Functions

static void to_json_array (json &j, const sol::table &tbl)
 
static void to_json_object (json &j, const sol::table &tbl)
 
static void to_json (json &j, const sol::table &tbl)
 
static void to_json (json &j, const sol::object &obj)
 
static void from_json (const json &j, sol::object &obj)
 

Detailed Description

Unfortunately, the way that sol is implemented, when json j = lua["key"], lua["key"].operator json&() is called, which leads to an error if lua["key"] is anything other than the usertype json.

For this reason, it's required to wrap any table access with something that turns it into a sol::object:

json j1 = lua["key"].template get<sol::object>(); json j2 = sol::object(lua["key"]);


The documentation for this struct was generated from the following file: