Single header JSON library in C99
Find a file
2025-02-23 13:02:17 +00:00
.gitignore Initial commit 2025-02-22 23:08:52 +00:00
example.c Initial commit 2025-02-22 23:08:52 +00:00
jay.h Fix check keyword 2025-02-23 13:02:17 +00:00
LICENSE Initial commit 2025-02-22 23:08:52 +00:00
README.md Initial commit 2025-02-22 23:08:52 +00:00

jay

jay is a single header JSON library for C, there is only two functions, jay_parse and jay_print which parse and print JSON respectively.

Usage

You must define JAY_IMPLEMENTATION before including the header file in one of your source files.

To use jay_parse, a char * to the JSON object is passed and a json_value is returned which contains the parsed JSON object. jay_print takes a json_value and indent which is the number of spaces to indent the JSON object, and prints the JSON object to stdout.

Simple example can be found in example.c.

Building

$ cc jay.h example.c -o example

Contributions

Contributions are welcomed, feel free to open a pull request.

License

This project is licensed under the GNU Public License v3.0. See LICENSE for more information.