Closed UltraEngine closed 1 year ago
Here is information on how sol detects containers: https://sol2.readthedocs.io/en/latest/containers.html
I don't think this will ever work. Sol is great but has extremely specific requirements that are easy to upset.
I started developing a table implementation in C++ and I'm getting more traction with that.
I implemented a table class for C++ that can be accessed from Lua and uses nlohmann::json to load JSON files: https://github.com/UltraEngine/tableplusplus
Description
I'm trying to integrate nlohmann::json into Lua using the sol library. The only remaining issue is how to iterate through key/value pairs.
Maybe you and the sol developer can work this out? Your libraries work together very well aside from this issue.
Reproduction steps
I declare nlohmann::json in sol like this:
Then I try to iterate through items in Lua like this:
Expected vs. actual results
I get an error saying "Error: It is not recognized as a container".
Minimal code example
No response
Error messages
Compiler and operating system
Visual Studio 2022 / Win 10
Library version
3.4.0
Validation
develop
branch is used.