2024-05-14 11:49:37 +08:00
|
|
|
LLGo wrapper of DaveGamble/cJSON
|
|
|
|
|
=====
|
|
|
|
|
|
|
|
|
|
## How to install
|
2024-06-20 00:44:15 +08:00
|
|
|
|
2024-06-14 10:40:46 +08:00
|
|
|
### on macOS (Homebrew)
|
2024-06-20 00:44:15 +08:00
|
|
|
|
2024-06-14 10:40:46 +08:00
|
|
|
```sh
|
|
|
|
|
brew install cjson
|
|
|
|
|
```
|
2024-06-20 00:44:15 +08:00
|
|
|
|
|
|
|
|
### on Linux (Debian/Ubuntu)
|
|
|
|
|
|
2024-06-15 17:35:55 +08:00
|
|
|
```sh
|
|
|
|
|
apt-get install -y libcjson-dev
|
|
|
|
|
```
|
2024-05-14 11:49:37 +08:00
|
|
|
|
|
|
|
|
## Demos
|
|
|
|
|
|
|
|
|
|
The `_demo` directory contains our demos (it start with `_` to prevent the `go` command from compiling it):
|
|
|
|
|
|
|
|
|
|
* [mkjson](_demo/mkjson/mkjson.go): create a json object and print it
|
|
|
|
|
|
|
|
|
|
### How to run demos
|
|
|
|
|
|
|
|
|
|
To run the demos in directory `_demo`:
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
cd <demo-directory> # eg. cd _demo/mkjson
|
|
|
|
|
llgo run .
|
|
|
|
|
```
|