public static int AddObject_s(IntPtr l)
    {
        int result;

        try
        {
            int num = LuaDLL.lua_gettop(l);
            if (num == 1)
            {
                JsonArray a;
                LuaObject.checkType <JsonArray>(l, 1, out a);
                JsonObject o = JsonUtility.AddObject(a);
                LuaObject.pushValue(l, true);
                LuaObject.pushValue(l, o);
                result = 2;
            }
            else if (num == 2)
            {
                JsonObject j;
                LuaObject.checkType <JsonObject>(l, 1, out j);
                string key;
                LuaObject.checkType(l, 2, out key);
                JsonObject o2 = JsonUtility.AddObject(j, key);
                LuaObject.pushValue(l, true);
                LuaObject.pushValue(l, o2);
                result = 2;
            }
            else
            {
                LuaObject.pushValue(l, false);
                LuaDLL.lua_pushstring(l, "No matched override function AddObject to call");
                result = 2;
            }
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }