Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sogaiu/janet-jsonish
JSON <-> JDN Converter in Pure Janet
https://github.com/sogaiu/janet-jsonish
janet jdn json
Last synced: 6 days ago
JSON representation
JSON <-> JDN Converter in Pure Janet
- Host: GitHub
- URL: https://github.com/sogaiu/janet-jsonish
- Owner: sogaiu
- Created: 2023-11-13T11:57:19.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-08-06T15:57:53.000Z (5 months ago)
- Last Synced: 2024-08-06T18:51:37.554Z (5 months ago)
- Topics: janet, jdn, json
- Language: Janet
- Homepage:
- Size: 57.6 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# jsonish
JSON <-> JDN conversion in pure Janet.
# Usage
```janet
(import jsonish :as j)(j/decode `"\u00a2 \u7a7a\ud834\udd1e\u6d77 \ud83e\udd86"`)
# =>
"Β’ η©Ίπζ΅· π¦"(deep= (j/encode {"Socrates" 1 "Seneca" 8})
(j/encode {"Seneca" 8 "Socrates" 1}))
# =>
true(def src
`{"bart": "person", "brian": [3, 8, 9]}`)(j/decode (j/encode (j/decode src)))
# =>
@{"bart" "person"
"brian" @[3 8 9]}(j/encode {"result" :null})
# =>
@`{"result": null}`
```# Alternatives
## C
* [spork](https://github.com/janet-lang/spork/)
## Pure Janet
* [janet-json-pure](https://github.com/Techcable/janet-json-pure) -
if Unicode support is important, might want to look at source closely
* [janet-pure-parsers](https://github.com/rlonstein/janet-pure-parsers) -
if Unicode support is important, might want to look at source closely
* [jayson](https://github.com/CFiggers/jayson)
* [medea](https://github.com/pyrmont/medea)# Credits
* bakpakin - `spork/json` from [spork](https://github.com/janet-lang/spork/)
* CFiggers - [jayson](https://github.com/CFiggers/jayson)