mirror of
https://github.com/ultrajson/ultrajson.git
synced 2024-06-10 14:16:04 +02:00
21 lines
412 B
C
21 lines
412 B
C
#include <Python.h>
|
|
|
|
/* objToJSON */
|
|
PyObject* objToJSON(PyObject* self, PyObject *arg);
|
|
void initObjToJSON();
|
|
|
|
|
|
static PyMethodDef ujsonMethods[] = {
|
|
{"encode", objToJSON, METH_O, "Converts arbitrary object recursivly into JSON as string"},
|
|
{NULL, NULL, 0, NULL} /* Sentinel */
|
|
};
|
|
|
|
|
|
|
|
PyMODINIT_FUNC
|
|
initujson(void)
|
|
{
|
|
initObjToJSON();
|
|
Py_InitModule("ujson", ujsonMethods);
|
|
|
|
} |