/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.6.2
 *
 * Copyright (c) 2022 Riverbank Computing Limited <info@riverbankcomputing.com>
 * 
 * This file is part of PyQt5.
 * 
 * This file may be used under the terms of the GNU General Public License
 * version 3.0 as published by the Free Software Foundation and appearing in
 * the file LICENSE included in the packaging of this file.  Please review the
 * following information to ensure the GNU General Public License version 3.0
 * requirements will be met: http://www.gnu.org/copyleft/gpl.html.
 * 
 * If you do not wish to use this file under the terms of the GPL version 3.0
 * then you may purchase a commercial license.  For more information contact
 * info@riverbankcomputing.com.
 * 
 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 */

#include "sipAPIQtCore.h"

#line 58 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qjsondocument.sip"
#include <qjsondocument.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.7/build/QtCore/sipQtCoreQJsonDocument.cpp"

#line 25 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qjsonobject.sip"
#include <qjsonobject.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.7/build/QtCore/sipQtCoreQJsonDocument.cpp"
#line 31 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qjsonarray.sip"
#include <qjsonarray.h>
#line 36 "/build/pyqt5/src/PyQt5-5.15.7/build/QtCore/sipQtCoreQJsonDocument.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qjsonvalue.sip"
#include <qjsonvalue.h>
#line 39 "/build/pyqt5/src/PyQt5-5.15.7/build/QtCore/sipQtCoreQJsonDocument.cpp"
#line 27 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qstring.sip"
#include <qstring.h>
#line 42 "/build/pyqt5/src/PyQt5-5.15.7/build/QtCore/sipQtCoreQJsonDocument.cpp"
#line 30 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qbytearray.sip"
#include <qbytearray.h>
#line 45 "/build/pyqt5/src/PyQt5-5.15.7/build/QtCore/sipQtCoreQJsonDocument.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qjsondocument.sip"
#include <qjsondocument.h>
#line 48 "/build/pyqt5/src/PyQt5-5.15.7/build/QtCore/sipQtCoreQJsonDocument.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qvariant.sip"
#include <qvariant.h>
#line 51 "/build/pyqt5/src/PyQt5-5.15.7/build/QtCore/sipQtCoreQJsonDocument.cpp"


PyDoc_STRVAR(doc_QJsonDocument_fromRawData, "fromRawData(bytes, int, validation: QJsonDocument.DataValidation = QJsonDocument.Validate) -> QJsonDocument");

extern "C" {static PyObject *meth_QJsonDocument_fromRawData(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_QJsonDocument_fromRawData(PyObject *, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const char* a0;
        int a1;
         ::QJsonDocument::DataValidation a2 = QJsonDocument::Validate;

        static const char *sipKwdList[] = {
            SIP_NULLPTR,
            SIP_NULLPTR,
            sipName_validation,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "si|E", &a0, &a1, sipType_QJsonDocument_DataValidation, &a2))
        {
             ::QJsonDocument*sipRes;

            sipRes = new  ::QJsonDocument( ::QJsonDocument::fromRawData(a0,a1,a2));

            return sipConvertFromNewType(sipRes,sipType_QJsonDocument,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QJsonDocument, sipName_fromRawData, doc_QJsonDocument_fromRawData);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QJsonDocument_rawData, "rawData(self) -> Tuple[bytes, int]");

extern "C" {static PyObject *meth_QJsonDocument_rawData(PyObject *, PyObject *);}
static PyObject *meth_QJsonDocument_rawData(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        int a0;
        const  ::QJsonDocument *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QJsonDocument, &sipCpp))
        {
            const char*sipRes;

            sipRes = sipCpp->rawData(&a0);

            return sipBuildResult(0,"(si)",sipRes,a0);
        }
    }

    sipNoMethod(sipParseErr, sipName_QJsonDocument, sipName_rawData, doc_QJsonDocument_rawData);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QJsonDocument_fromBinaryData, "fromBinaryData(Union[QByteArray, bytes, bytearray], validation: QJsonDocument.DataValidation = QJsonDocument.Validate) -> QJsonDocument");

extern "C" {static PyObject *meth_QJsonDocument_fromBinaryData(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_QJsonDocument_fromBinaryData(PyObject *, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QByteArray* a0;
        int a0State = 0;
         ::QJsonDocument::DataValidation a1 = QJsonDocument::Validate;

        static const char *sipKwdList[] = {
            SIP_NULLPTR,
            sipName_validation,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "J1|E", sipType_QByteArray, &a0, &a0State, sipType_QJsonDocument_DataValidation, &a1))
        {
             ::QJsonDocument*sipRes;

            sipRes = new  ::QJsonDocument( ::QJsonDocument::fromBinaryData(*a0,a1));
            sipReleaseType(const_cast< ::QByteArray *>(a0), sipType_QByteArray, a0State);

            return sipConvertFromNewType(sipRes,sipType_QJsonDocument,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QJsonDocument, sipName_fromBinaryData, doc_QJsonDocument_fromBinaryData);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QJsonDocument_toBinaryData, "toBinaryData(self) -> QByteArray");

extern "C" {static PyObject *meth_QJsonDocument_toBinaryData(PyObject *, PyObject *);}
static PyObject *meth_QJsonDocument_toBinaryData(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QJsonDocument *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QJsonDocument, &sipCpp))
        {
             ::QByteArray*sipRes;

            sipRes = new  ::QByteArray(sipCpp->toBinaryData());

            return sipConvertFromNewType(sipRes,sipType_QByteArray,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QJsonDocument, sipName_toBinaryData, doc_QJsonDocument_toBinaryData);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QJsonDocument_fromVariant, "fromVariant(Any) -> QJsonDocument");

extern "C" {static PyObject *meth_QJsonDocument_fromVariant(PyObject *, PyObject *);}
static PyObject *meth_QJsonDocument_fromVariant(PyObject *, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QVariant* a0;
        int a0State = 0;

        if (sipParseArgs(&sipParseErr, sipArgs, "J1", sipType_QVariant, &a0, &a0State))
        {
             ::QJsonDocument*sipRes;

            sipRes = new  ::QJsonDocument( ::QJsonDocument::fromVariant(*a0));
            sipReleaseType(const_cast< ::QVariant *>(a0), sipType_QVariant, a0State);

            return sipConvertFromNewType(sipRes,sipType_QJsonDocument,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QJsonDocument, sipName_fromVariant, doc_QJsonDocument_fromVariant);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QJsonDocument_toVariant, "toVariant(self) -> Any");

extern "C" {static PyObject *meth_QJsonDocument_toVariant(PyObject *, PyObject *);}
static PyObject *meth_QJsonDocument_toVariant(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QJsonDocument *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QJsonDocument, &sipCpp))
        {
             ::QVariant*sipRes;

            sipRes = new  ::QVariant(sipCpp->toVariant());

            return sipConvertFromNewType(sipRes,sipType_QVariant,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QJsonDocument, sipName_toVariant, doc_QJsonDocument_toVariant);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QJsonDocument_fromJson, "fromJson(Union[QByteArray, bytes, bytearray], error: QJsonParseError = None) -> QJsonDocument");

extern "C" {static PyObject *meth_QJsonDocument_fromJson(PyObject *, PyObject *, PyObject *);}
static PyObject *meth_QJsonDocument_fromJson(PyObject *, PyObject *sipArgs, PyObject *sipKwds)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QByteArray* a0;
        int a0State = 0;
         ::QJsonParseError* a1 = 0;

        static const char *sipKwdList[] = {
            SIP_NULLPTR,
            sipName_error,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "J1|J8", sipType_QByteArray, &a0, &a0State, sipType_QJsonParseError, &a1))
        {
             ::QJsonDocument*sipRes;

            sipRes = new  ::QJsonDocument( ::QJsonDocument::fromJson(*a0,a1));
            sipReleaseType(const_cast< ::QByteArray *>(a0), sipType_QByteArray, a0State);

            return sipConvertFromNewType(sipRes,sipType_QJsonDocument,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QJsonDocument, sipName_fromJson, doc_QJsonDocument_fromJson);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QJsonDocument_toJson, "toJson(self) -> QByteArray\n"
"toJson(self, QJsonDocument.JsonFormat) -> QByteArray");

extern "C" {static PyObject *meth_QJsonDocument_toJson(PyObject *, PyObject *);}
static PyObject *meth_QJsonDocument_toJson(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QJsonDocument *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QJsonDocument, &sipCpp))
        {
             ::QByteArray*sipRes;

            sipRes = new  ::QByteArray(sipCpp->toJson());

            return sipConvertFromNewType(sipRes,sipType_QByteArray,SIP_NULLPTR);
        }
    }

    {
         ::QJsonDocument::JsonFormat a0;
        const  ::QJsonDocument *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BE", &sipSelf, sipType_QJsonDocument, &sipCpp, sipType_QJsonDocument_JsonFormat, &a0))
        {
             ::QByteArray*sipRes;

            sipRes = new  ::QByteArray(sipCpp->toJson(a0));

            return sipConvertFromNewType(sipRes,sipType_QByteArray,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QJsonDocument, sipName_toJson, doc_QJsonDocument_toJson);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QJsonDocument_isEmpty, "isEmpty(self) -> bool");

extern "C" {static PyObject *meth_QJsonDocument_isEmpty(PyObject *, PyObject *);}
static PyObject *meth_QJsonDocument_isEmpty(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QJsonDocument *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QJsonDocument, &sipCpp))
        {
            bool sipRes;

            sipRes = sipCpp->isEmpty();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QJsonDocument, sipName_isEmpty, doc_QJsonDocument_isEmpty);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QJsonDocument_isArray, "isArray(self) -> bool");

extern "C" {static PyObject *meth_QJsonDocument_isArray(PyObject *, PyObject *);}
static PyObject *meth_QJsonDocument_isArray(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QJsonDocument *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QJsonDocument, &sipCpp))
        {
            bool sipRes;

            sipRes = sipCpp->isArray();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QJsonDocument, sipName_isArray, doc_QJsonDocument_isArray);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QJsonDocument_isObject, "isObject(self) -> bool");

extern "C" {static PyObject *meth_QJsonDocument_isObject(PyObject *, PyObject *);}
static PyObject *meth_QJsonDocument_isObject(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QJsonDocument *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QJsonDocument, &sipCpp))
        {
            bool sipRes;

            sipRes = sipCpp->isObject();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QJsonDocument, sipName_isObject, doc_QJsonDocument_isObject);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QJsonDocument_object, "object(self) -> Dict[str, QJsonValue]");

extern "C" {static PyObject *meth_QJsonDocument_object(PyObject *, PyObject *);}
static PyObject *meth_QJsonDocument_object(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QJsonDocument *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QJsonDocument, &sipCpp))
        {
             ::QJsonObject*sipRes;

            sipRes = new  ::QJsonObject(sipCpp->object());

            return sipConvertFromNewType(sipRes,sipType_QJsonObject,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QJsonDocument, sipName_object, doc_QJsonDocument_object);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QJsonDocument_array, "array(self) -> List[QJsonValue]");

extern "C" {static PyObject *meth_QJsonDocument_array(PyObject *, PyObject *);}
static PyObject *meth_QJsonDocument_array(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QJsonDocument *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QJsonDocument, &sipCpp))
        {
             ::QJsonArray*sipRes;

            sipRes = new  ::QJsonArray(sipCpp->array());

            return sipConvertFromNewType(sipRes,sipType_QJsonArray,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QJsonDocument, sipName_array, doc_QJsonDocument_array);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QJsonDocument_setObject, "setObject(self, Dict[str, Union[QJsonValue, QJsonValue.Type, Iterable[QJsonValue], bool, int, float, None, str]])");

extern "C" {static PyObject *meth_QJsonDocument_setObject(PyObject *, PyObject *);}
static PyObject *meth_QJsonDocument_setObject(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QJsonObject* a0;
        int a0State = 0;
         ::QJsonDocument *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_QJsonDocument, &sipCpp, sipType_QJsonObject, &a0, &a0State))
        {
            sipCpp->setObject(*a0);
            sipReleaseType(const_cast< ::QJsonObject *>(a0), sipType_QJsonObject, a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QJsonDocument, sipName_setObject, doc_QJsonDocument_setObject);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QJsonDocument_setArray, "setArray(self, Iterable[QJsonValue])");

extern "C" {static PyObject *meth_QJsonDocument_setArray(PyObject *, PyObject *);}
static PyObject *meth_QJsonDocument_setArray(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QJsonArray* a0;
        int a0State = 0;
         ::QJsonDocument *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_QJsonDocument, &sipCpp, sipType_QJsonArray, &a0, &a0State))
        {
            sipCpp->setArray(*a0);
            sipReleaseType(const_cast< ::QJsonArray *>(a0), sipType_QJsonArray, a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QJsonDocument, sipName_setArray, doc_QJsonDocument_setArray);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QJsonDocument_isNull, "isNull(self) -> bool");

extern "C" {static PyObject *meth_QJsonDocument_isNull(PyObject *, PyObject *);}
static PyObject *meth_QJsonDocument_isNull(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QJsonDocument *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QJsonDocument, &sipCpp))
        {
            bool sipRes;

            sipRes = sipCpp->isNull();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QJsonDocument, sipName_isNull, doc_QJsonDocument_isNull);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QJsonDocument_swap, "swap(self, QJsonDocument)");

extern "C" {static PyObject *meth_QJsonDocument_swap(PyObject *, PyObject *);}
static PyObject *meth_QJsonDocument_swap(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;

    {
         ::QJsonDocument* a0;
         ::QJsonDocument *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_QJsonDocument, &sipCpp, sipType_QJsonDocument, &a0))
        {
            sipCpp->swap(*a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QJsonDocument, sipName_swap, doc_QJsonDocument_swap);

    return SIP_NULLPTR;
}


extern "C" {static PyObject *slot_QJsonDocument___getitem__(PyObject *,PyObject *);}
static PyObject *slot_QJsonDocument___getitem__(PyObject *sipSelf,PyObject *sipArg)
{
     ::QJsonDocument *sipCpp = reinterpret_cast< ::QJsonDocument *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_QJsonDocument));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QString* a0;
        int a0State = 0;

        if (sipParseArgs(&sipParseErr, sipArg, "1J1", sipType_QString, &a0, &a0State))
        {
             ::QJsonValue*sipRes;

            sipRes = new  ::QJsonValue((*sipCpp)[*a0]);
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);

            return sipConvertFromNewType(sipRes,sipType_QJsonValue,SIP_NULLPTR);
        }
    }

    {
        int a0;

        if (sipParseArgs(&sipParseErr, sipArg, "1i", &a0))
        {
             ::QJsonValue*sipRes;

            sipRes = new  ::QJsonValue((*sipCpp)[a0]);

            return sipConvertFromNewType(sipRes,sipType_QJsonValue,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QJsonDocument, sipName___getitem__, SIP_NULLPTR);

    return SIP_NULLPTR;
}


extern "C" {static PyObject *slot_QJsonDocument___ne__(PyObject *,PyObject *);}
static PyObject *slot_QJsonDocument___ne__(PyObject *sipSelf,PyObject *sipArg)
{
     ::QJsonDocument *sipCpp = reinterpret_cast< ::QJsonDocument *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_QJsonDocument));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QJsonDocument* a0;

        if (sipParseArgs(&sipParseErr, sipArg, "1J9", sipType_QJsonDocument, &a0))
        {
            bool sipRes;

            sipRes = sipCpp-> ::QJsonDocument::operator!=(*a0);

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return SIP_NULLPTR;

    return sipPySlotExtend(&sipModuleAPI_QtCore, ne_slot, sipType_QJsonDocument, sipSelf, sipArg);
}


extern "C" {static PyObject *slot_QJsonDocument___eq__(PyObject *,PyObject *);}
static PyObject *slot_QJsonDocument___eq__(PyObject *sipSelf,PyObject *sipArg)
{
     ::QJsonDocument *sipCpp = reinterpret_cast< ::QJsonDocument *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf,sipType_QJsonDocument));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const  ::QJsonDocument* a0;

        if (sipParseArgs(&sipParseErr, sipArg, "1J9", sipType_QJsonDocument, &a0))
        {
            bool sipRes;

            sipRes = sipCpp-> ::QJsonDocument::operator==(*a0);

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    if (sipParseErr == Py_None)
        return SIP_NULLPTR;

    return sipPySlotExtend(&sipModuleAPI_QtCore, eq_slot, sipType_QJsonDocument, sipSelf, sipArg);
}


/* Call the instance's destructor. */
extern "C" {static void release_QJsonDocument(void *, int);}
static void release_QJsonDocument(void *sipCppV, int)
{
    delete reinterpret_cast< ::QJsonDocument *>(sipCppV);
}


extern "C" {static void *array_QJsonDocument(Py_ssize_t);}
static void *array_QJsonDocument(Py_ssize_t sipNrElem)
{
    return new  ::QJsonDocument[sipNrElem];
}


extern "C" {static void array_delete_QJsonDocument(void *);}
static void array_delete_QJsonDocument(void *sipCpp)
{
    delete[] reinterpret_cast< ::QJsonDocument *>(sipCpp);
}


extern "C" {static void assign_QJsonDocument(void *, Py_ssize_t, void *);}
static void assign_QJsonDocument(void *sipDst, Py_ssize_t sipDstIdx, void *sipSrc)
{
    reinterpret_cast< ::QJsonDocument *>(sipDst)[sipDstIdx] = *reinterpret_cast< ::QJsonDocument *>(sipSrc);
}


extern "C" {static void *copy_QJsonDocument(const void *, Py_ssize_t);}
static void *copy_QJsonDocument(const void *sipSrc, Py_ssize_t sipSrcIdx)
{
    return new  ::QJsonDocument(reinterpret_cast<const  ::QJsonDocument *>(sipSrc)[sipSrcIdx]);
}


extern "C" {static void dealloc_QJsonDocument(sipSimpleWrapper *);}
static void dealloc_QJsonDocument(sipSimpleWrapper *sipSelf)
{
    if (sipIsOwnedByPython(sipSelf))
    {
        release_QJsonDocument(sipGetAddress(sipSelf), 0);
    }
}


extern "C" {static void *init_type_QJsonDocument(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_type_QJsonDocument(sipSimpleWrapper *, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
{
     ::QJsonDocument *sipCpp = SIP_NULLPTR;

    {
        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, ""))
        {
            sipCpp = new  ::QJsonDocument();

            return sipCpp;
        }
    }

    {
        const  ::QJsonObject* a0;
        int a0State = 0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "J1", sipType_QJsonObject, &a0, &a0State))
        {
            sipCpp = new  ::QJsonDocument(*a0);
            sipReleaseType(const_cast< ::QJsonObject *>(a0), sipType_QJsonObject, a0State);

            return sipCpp;
        }
    }

    {
        const  ::QJsonArray* a0;
        int a0State = 0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "J1", sipType_QJsonArray, &a0, &a0State))
        {
            sipCpp = new  ::QJsonDocument(*a0);
            sipReleaseType(const_cast< ::QJsonArray *>(a0), sipType_QJsonArray, a0State);

            return sipCpp;
        }
    }

    {
        const  ::QJsonDocument* a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "J9", sipType_QJsonDocument, &a0))
        {
            sipCpp = new  ::QJsonDocument(*a0);

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


/* Define this type's Python slots. */
static sipPySlotDef slots_QJsonDocument[] = {
    {(void *)slot_QJsonDocument___getitem__, getitem_slot},
    {(void *)slot_QJsonDocument___ne__, ne_slot},
    {(void *)slot_QJsonDocument___eq__, eq_slot},
    {0, (sipPySlotType)0}
};


static PyMethodDef methods_QJsonDocument[] = {
    {sipName_array, meth_QJsonDocument_array, METH_VARARGS, doc_QJsonDocument_array},
    {sipName_fromBinaryData, SIP_MLMETH_CAST(meth_QJsonDocument_fromBinaryData), METH_VARARGS|METH_KEYWORDS, doc_QJsonDocument_fromBinaryData},
    {sipName_fromJson, SIP_MLMETH_CAST(meth_QJsonDocument_fromJson), METH_VARARGS|METH_KEYWORDS, doc_QJsonDocument_fromJson},
    {sipName_fromRawData, SIP_MLMETH_CAST(meth_QJsonDocument_fromRawData), METH_VARARGS|METH_KEYWORDS, doc_QJsonDocument_fromRawData},
    {sipName_fromVariant, meth_QJsonDocument_fromVariant, METH_VARARGS, doc_QJsonDocument_fromVariant},
    {sipName_isArray, meth_QJsonDocument_isArray, METH_VARARGS, doc_QJsonDocument_isArray},
    {sipName_isEmpty, meth_QJsonDocument_isEmpty, METH_VARARGS, doc_QJsonDocument_isEmpty},
    {sipName_isNull, meth_QJsonDocument_isNull, METH_VARARGS, doc_QJsonDocument_isNull},
    {sipName_isObject, meth_QJsonDocument_isObject, METH_VARARGS, doc_QJsonDocument_isObject},
    {sipName_object, meth_QJsonDocument_object, METH_VARARGS, doc_QJsonDocument_object},
    {sipName_rawData, meth_QJsonDocument_rawData, METH_VARARGS, doc_QJsonDocument_rawData},
    {sipName_setArray, meth_QJsonDocument_setArray, METH_VARARGS, doc_QJsonDocument_setArray},
    {sipName_setObject, meth_QJsonDocument_setObject, METH_VARARGS, doc_QJsonDocument_setObject},
    {sipName_swap, meth_QJsonDocument_swap, METH_VARARGS, doc_QJsonDocument_swap},
    {sipName_toBinaryData, meth_QJsonDocument_toBinaryData, METH_VARARGS, doc_QJsonDocument_toBinaryData},
    {sipName_toJson, meth_QJsonDocument_toJson, METH_VARARGS, doc_QJsonDocument_toJson},
    {sipName_toVariant, meth_QJsonDocument_toVariant, METH_VARARGS, doc_QJsonDocument_toVariant}
};

static sipEnumMemberDef enummembers_QJsonDocument[] = {
    {sipName_BypassValidation, static_cast<int>( ::QJsonDocument::BypassValidation), 113},
    {sipName_Compact, static_cast<int>( ::QJsonDocument::Compact), 114},
    {sipName_Indented, static_cast<int>( ::QJsonDocument::Indented), 114},
    {sipName_Validate, static_cast<int>( ::QJsonDocument::Validate), 113},
};

PyDoc_STRVAR(doc_QJsonDocument, "\1QJsonDocument()\n"
"QJsonDocument(Dict[str, Union[QJsonValue, QJsonValue.Type, Iterable[QJsonValue], bool, int, float, None, str]])\n"
"QJsonDocument(Iterable[QJsonValue])\n"
"QJsonDocument(QJsonDocument)");


static pyqt5ClassPluginDef plugin_QJsonDocument = {
    SIP_NULLPTR,
    0,
    SIP_NULLPTR,
    SIP_NULLPTR
};


sipClassTypeDef sipTypeDef_QtCore_QJsonDocument = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QJsonDocument,
        SIP_NULLPTR,
        &plugin_QJsonDocument
    },
    {
        sipNameNr_QJsonDocument,
        {0, 0, 1},
        17, methods_QJsonDocument,
        4, enummembers_QJsonDocument,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QJsonDocument,
    -1,
    sipNameNr_sip_simplewrapper,
    SIP_NULLPTR,
    slots_QJsonDocument,
    init_type_QJsonDocument,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QJsonDocument,
    assign_QJsonDocument,
    array_QJsonDocument,
    copy_QJsonDocument,
    release_QJsonDocument,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QJsonDocument,
    sizeof ( ::QJsonDocument),
};
