mirror of
https://github.com/sigmasternchen/libargo
synced 2025-03-15 05:08:54 +00:00
Merge branch 'main' of github.com:overflowerror/Cson
This commit is contained in:
commit
ef08e3688d
2 changed files with 8 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
name: C/C++ CI
|
||||
name: Test Suit
|
||||
|
||||
on:
|
||||
push:
|
|
@ -1,6 +1,8 @@
|
|||
# Cson
|
||||
## JSON Library for C
|
||||
|
||||
[](https://github.com/overflowerror/Cson/actions/workflows/test-suit.yml)
|
||||
|
||||
This library was originaly just a finger exercise to see if I could build a JSON lib from scratch. That also means that I can't guarantee for anything - treat it as highly unstable.
|
||||
|
||||
Nevertheless you are welcome to use or modify the code as you like. I also appriciate pull requests.
|
||||
|
@ -126,11 +128,16 @@ object_selector := key
|
|||
```
|
||||
|
||||
Examples:
|
||||
|
||||
`.foobar` will select the corresponding value for the key "foobar" from an object
|
||||
|
||||
`.[4]` will select the 5th (index counting starts with 0) from an array
|
||||
|
||||
`.[0].foo` will select the key "foo" from the first entry in an array
|
||||
|
||||
`.foo.bar.[0]` will select the first element in the key "bar" in the key "foo" in an object
|
||||
|
||||
|
||||
Note: As with the `json_array_get()` and `json_object_get()` the returned value is a clone and has to be freed seperately.
|
||||
|
||||
### Stringify
|
||||
|
|
Loading…
Reference in a new issue