Mahbub Alam 2950d88545
Add cjson module (#151)
* Add cjson module

* Create structure for cjson module

* Implemenet loads function

* Convert cJsonBool to python boolean

* Implement dumps function

* Convert json bool and null to python Bool and None

* necessary changes of project structure

* Update amalgamate.py

* Support non-dictionary json objects (list, tuple, string, number, bool, null)

* Fix tests

* fix CI

* fix CI

* Convert python to cJson and then to string

* Delete cJSON object after use

---------

Co-authored-by: Mahbub Alam <alam.mahbub214@gmail.com>
Co-authored-by: blueloveTH <blueloveth@foxmail.com>
2023-10-15 13:32:20 +08:00

30 lines
571 B
C++

#pragma once
#include "compiler.h"
#include "obj.h"
#include "repl.h"
#include "iter.h"
#include "base64.h"
#include "cffi.h"
#include "linalg.h"
#include "easing.h"
#include "io.h"
#include "vm.h"
#include "re.h"
#include "random.h"
#include "bindings.h"
namespace pkpy {
void init_builtins(VM* _vm);
void add_module_timeit(VM* vm);
void add_module_time(VM* vm);
void add_module_sys(VM* vm);
void add_module_json(VM* vm);
void add_module_math(VM* vm);
void add_module_dis(VM* vm);
void add_module_traceback(VM* vm);
void add_module_gc(VM* vm);
} // namespace pkpy