Correct.
This is why I wanted to know the scope of things.
Although we try to avoid doing breaking changes, it doesn’t mean we won’t do them when we feel we need to.
In the case of the dmJson API, it wasn’t really an api, and as such, we couldn’t really swap out the backend. Also, while doing this, I realized that the engine itself doesn’t actually need the api.
And, if we’re doing a breaking change, why not try to make the best out of it.
So, we’ll remove the C++ api (and we may implement a C++ api as an extension, but only if necessary, hence this post)
As for the cases you pointed out (there are several), we have changed the API somewhat for dmScript::JsonToLua()
so that it doesn’t take the old dmJson::Document* pointer. As such, it will be a lot simpler (and faster!) to convert to and from Lua and the string:
int dmScript::JsonToLua(lua_State* L, const char* json, size_t json_len);
int dmScript::LuaToJson(lua_State* L, char** json, size_t* json_len);
Imho, it will make the code easier to read and maintain, and the main hassle of upgrading the extensions, will be the version numbers/releases (it’s easy to miss an extension that uses this api)
You can see the full pull request here.