Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xuwei-k/msgpack-json
web api for convert msgpack <=> json
https://github.com/xuwei-k/msgpack-json
appengine json msgpack scala
Last synced: 18 days ago
JSON representation
web api for convert msgpack <=> json
- Host: GitHub
- URL: https://github.com/xuwei-k/msgpack-json
- Owner: xuwei-k
- Created: 2015-01-27T12:55:52.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2023-12-04T11:21:52.000Z (11 months ago)
- Last Synced: 2024-10-03T10:43:49.323Z (about 1 month ago)
- Topics: appengine, json, msgpack, scala
- Language: Scala
- Size: 33.2 KB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# msgpack-json
### example
#### msgpack binary data => json string
```
$ scala -e 'java.nio.file.Files.write(new java.io.File("msgpack_data1").toPath, Array(0x81, 0xa3, 0x61, 0x62, 0x63, 0x92, 0xc2, 0x2a).map(_.toByte))'
$ curl -X POST -d @msgpack_data1 https://msgpack-json.appspot.com/msgpack2json
{"abc":[false,42]}
```#### json string => msgpack binary data
```
$ curl -X POST -d '{"abc":[false,42]}' https://msgpack-json.appspot.com/json2msgpack > msgpack_data2
$ scala -e 'println(java.nio.file.Files.readAllBytes(new java.io.File("msgpack_data2").toPath).map("%02x" format _).mkString(","))'
81,a3,61,62,63,92,c2,2a
```