- Parse json files/strings of any sizes
- Stringify JSON
- Easily create JSON programmatically
#include "JSONitator.h"
void main()
{
const char *json_str = "{\"field\":\"value\"}";
JSON *j = json_parse(json_str);
JSON *entry = json_object_get(j,"field");
char *value = json_value_string(entry);
printf("Json: %s\n", json_stringify(j));
printf("Value: %s\n", value);
return 0;
}
// This is an example with 0 error checking, for real-world usage check example.c
- Water the plants
- Remove windows-only functions
- Functions for creating JSON structs without parsing
- Check for hidden memory leaks
- More testing with malformed JSON strings