|
Lines 51-57
Link Here
|
| 51 |
{ |
51 |
{ |
| 52 |
json_object* json_network = json_object_from_file(file_path); |
52 |
json_object* json_network = json_object_from_file(file_path); |
| 53 |
|
53 |
|
| 54 |
if (is_error(json_network)) |
54 |
if (json_network == nullptr) |
| 55 |
{ |
55 |
{ |
| 56 |
SG_ERROR("Error while opening file: %s!\n", file_path); |
56 |
SG_ERROR("Error while opening file: %s!\n", file_path); |
| 57 |
return NULL; |
57 |
return NULL; |
|
Lines 68-74
Link Here
|
| 68 |
{ |
68 |
{ |
| 69 |
json_object* json_network = json_tokener_parse(str); |
69 |
json_object* json_network = json_tokener_parse(str); |
| 70 |
|
70 |
|
| 71 |
if (is_error(json_network)) |
71 |
if (json_network == nullptr) |
| 72 |
{ |
72 |
{ |
| 73 |
SG_ERROR("Error while parsing the given string\n"); |
73 |
SG_ERROR("Error while parsing the given string\n"); |
| 74 |
return NULL; |
74 |
return NULL; |