@@ -77,7 +77,7 @@ int encode_cmd(int argc, char** argv){
7777 break ;
7878 case ' j' :
7979 if ((json == nullptr ) && (json_data == nullptr )){
80- if (json_validate (optarg)){
80+ if (cPiCode:: json_validate (optarg)){
8181 json = optarg;
8282 }else {
8383 fprintf (stderr," error: json '%s' invalid\n " ,optarg);
@@ -90,14 +90,14 @@ int encode_cmd(int argc, char** argv){
9090 break ;
9191 case ' f' :
9292 if ((json_data == nullptr ) && (json == nullptr ) && (protocol == nullptr )){
93- if (json_validate (optarg)){
93+ if (cPiCode:: json_validate (optarg)){
9494
9595 /* decode as root json */
96- JsonNode* root_json = json_decode (optarg);
96+ cPiCode:: JsonNode* root_json = cPiCode:: json_decode (optarg);
9797 if (root_json != nullptr ){
9898
9999 /* check for child */
100- JsonNode* child_json = json_first_child (root_json);
100+ cPiCode:: JsonNode* child_json = cPiCode:: json_first_child (root_json);
101101 if (child_json != nullptr ){
102102
103103 /* check for child key */
@@ -113,7 +113,7 @@ int encode_cmd(int argc, char** argv){
113113 fprintf (stderr, " error: protocol '%s' no encode support\n " , child_json->key );
114114 error_flag--;
115115 }else {
116- json_data = json_encode (child_json);
116+ json_data = cPiCode:: json_encode (child_json);
117117 if (json_data != nullptr ){
118118 json = json_data;
119119 }else {
@@ -126,12 +126,12 @@ int encode_cmd(int argc, char** argv){
126126 fprintf (stderr, " error: full json child no key\n " );
127127 error_flag--;
128128 }
129- json_delete (child_json);
129+ cPiCode:: json_delete (child_json);
130130 }else {
131131 fprintf (stderr, " error: full json no child\n " );
132132 error_flag--;
133133 }
134- json_delete (root_json);
134+ cPiCode:: json_delete (root_json);
135135 }else {
136136 fprintf (stderr, " error: full json decode fault\n " );
137137 error_flag--;
0 commit comments