mirror of https://github.com/dnomd343/ClearDNS
Dnomd343
2 years ago
7 changed files with 22 additions and 83 deletions
@ -1,24 +0,0 @@ |
|||
#include <stdio.h> |
|||
#include <string.h> |
|||
#include "to_json.h" |
|||
|
|||
int main() { |
|||
printf("start demo\n"); |
|||
|
|||
char yaml_string[] = "test: ok\narray:\n - 123\n - 234\n - 345\n"; |
|||
printf("----------------\n"); |
|||
printf("%s", yaml_string); |
|||
printf("----------------\n"); |
|||
|
|||
const char *raw_json_string = to_json_rust(yaml_string); |
|||
char *json_string = strdup(raw_json_string); |
|||
|
|||
printf("----------------\n"); |
|||
printf("%s\n", json_string); |
|||
printf("----------------\n"); |
|||
|
|||
free_rust_string(raw_json_string); |
|||
printf("rust string free complete\n"); |
|||
|
|||
return 0; |
|||
} |
Loading…
Reference in new issue