move parse() to JSON class

This commit is contained in:
pikastech 2022-06-02 16:30:10 +08:00
parent 3b3859b7bc
commit b0bb4e15d0
5 changed files with 12 additions and 27 deletions

View File

@ -6,7 +6,4 @@ import json
class cJSON(TinyObj): class cJSON(TinyObj):
def __init__(self): ... def __init__(self): ...
def print(self) -> str: ... def print(self) -> str: ...
def parse(self, val: str) -> any: ...
class Utils(TinyObj):
def parse(self) -> cJSON: ...
def createObject(self) -> cJSON: ...

View File

@ -1,9 +1,9 @@
#include "cJSON_cJSON.h" #include "cJSON_cJSON.h"
char* cJSON_cJSON_print(PikaObj *self){ void cJSON_cJSON___init__(PikaObj* self) {}
Arg* cJSON_cJSON_parse(PikaObj* self, char* val) {
return NULL; return NULL;
} }
char* cJSON_cJSON_print(PikaObj* self) {
void cJSON_cJSON___init__(PikaObj *self){ return NULL;
}
}

View File

@ -6,7 +6,4 @@ import json
class cJSON(TinyObj): class cJSON(TinyObj):
def __init__(self): ... def __init__(self): ...
def print(self) -> str: ... def print(self) -> str: ...
def parse(self, val: str) -> any: ...
class Utils(TinyObj):
def parse(self) -> cJSON: ...
def createObject(self) -> cJSON: ...

View File

@ -1,9 +0,0 @@
#include "cJSON_Utils.h"
PikaObj* cJSON_Utils_parse(PikaObj* self) {
return NULL;
}
PikaObj* cJSON_Utils_createObject(PikaObj *self){
return NULL;
}

View File

@ -1,9 +1,9 @@
#include "cJSON_cJSON.h" #include "cJSON_cJSON.h"
char* cJSON_cJSON_print(PikaObj *self){ void cJSON_cJSON___init__(PikaObj* self) {}
Arg* cJSON_cJSON_parse(PikaObj* self, char* val) {
return NULL; return NULL;
} }
char* cJSON_cJSON_print(PikaObj* self) {
void cJSON_cJSON___init__(PikaObj *self){ return NULL;
}
}