https://github.com/aichingm/libcj
Libcj is a simple header only json stringify and parsing library written in c.
https://github.com/aichingm/libcj
c json parser
Last synced: about 2 months ago
JSON representation
Libcj is a simple header only json stringify and parsing library written in c.
- Host: GitHub
- URL: https://github.com/aichingm/libcj
- Owner: aichingm
- License: agpl-3.0
- Created: 2024-12-27T13:23:28.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-27T13:26:59.000Z (over 1 year ago)
- Last Synced: 2025-05-19T15:11:55.147Z (about 1 year ago)
- Topics: c, json, parser
- Language: C
- Homepage:
- Size: 53.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Libcj
Libcj is a simple header only json stringify and parsing library written in c, released under the [AGPL-3.0-only](https://spdx.org/licenses/AGPL-3.0-only.html).
[cj.h](./cj.h)
## Usage
Important notice
The general usage is to include the implementation in you "main.c" file
```c
#define IMPL_CJ
#include "cj.h"
```
and include only the header in other files like
```
#include "cj.h"
```
Examles are provided in the [examples directory](./examples).
* [Parsing json into a struct](./examples/parse_object.c)
* [Decoding JSON](./examples/decode.c)
* [Encoding JSON](./examples/encoder.c)
For more inspiration checkout the tests in [tests](./tests).
## License
```
Copyright (C) 2024 Mario Aichinger
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, version 3.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see .
```