Skip to content

wAIfu-DEV/JSONitator

Repository files navigation

JSONitator

Lightweight JSON Parser Library

What can it do?

  1. Parse json files/strings of any sizes
  2. Stringify JSON
  3. 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

TODO

  • 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

About

Lightweight JSON parser

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published