This commit is contained in:
blueloveTH 2023-10-15 02:08:32 +08:00
parent 744418df0d
commit 7ae7e0b50d
3 changed files with 11 additions and 3 deletions

View File

@ -127,7 +127,7 @@ void add_module_cjson(VM* vm){
const Str& expr = CAST(Str&, args[0]);
cJSON *json = cJSON_Parse(expr.c_str());
cJSON *json = cJSON_ParseWithLength(expr.data, expr.size);
PyObject* output = convert_cjson_to_python_object(json, vm);
cJSON_Delete(json);

View File

@ -14,7 +14,11 @@ a = {
'h': False
}
try:
import cjson as json
print('[INFO] cjson is used')
except ImportError:
import json
_j = json.dumps(a)
_a = json.loads(_j)

View File

@ -1,4 +1,8 @@
try:
import cjson as json
print('[INFO] cjson is used')
except ImportError:
import json
_2489KB = 'WorldMap_GridVania_layout.ldtk'
_1093KB = 'WorldMap_Free_layout.ldtk'