playing around with JSON
Go to file
pala 471f1d9045
Update README.md
2022-04-26 17:54:41 -04:00
LICENSE Initial commit 2022-04-25 22:43:05 -04:00
README.md Update README.md 2022-04-26 17:54:41 -04:00
jj.h Update jj.h 2022-04-26 17:54:00 -04:00

README.md

jj

almost complete JSON parser in C

is it usable?

pretty much, just missing unicode (unicode will be ignored)

example usage

#include "jj.h"

int main()
{
  struct json_value v = parse_string("{\"foo\": \"bar\", \"baz\": [1, 2.3, \"three\"]}");
  struct json_value* vv = get_value_from_object(&v, "baz");
  printf("baz[1]: %f\n", get_value_from_array(vv, 1)->decimal);
  printf("foo: %s\n", get_value_from_object(&v, "foo")->string);
  free_json(v);
  return 0;
}

todo

  • unicode