Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/werdl/jtp
A library for sending JSON informatio over the internet
https://github.com/werdl/jtp
Last synced: about 7 hours ago
JSON representation
A library for sending JSON informatio over the internet
- Host: GitHub
- URL: https://github.com/werdl/jtp
- Owner: werdl
- License: apache-2.0
- Created: 2024-01-15T18:28:21.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-01-16T11:42:38.000Z (10 months ago)
- Last Synced: 2024-01-16T18:35:29.732Z (10 months ago)
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# jtp - for moving data more efficiently
## Why
- send and retrieve data using the ubiquitous JSON format
- strip down on the faff
- send only vital information
- updated for the new web## Format
### GET
```json
{
"jtp": {
"version": "0.1.0",
"type": "get" // therefore sent from a user
},"host": {
"os": {
"host-triple": "x86_64-unknown-linux-gnu",
"distro": "debian-12",
},
"net": {
"ipv4": "1.2.3.4",
"ipv6": "2001:0db8:85a3:0000:0000:0000:0000:0000"
},
"agent": "SampleImpl/1.0" // sender name and version
},"payload": {
"head": {
"url": "https://example.com/jtp",
},"body": { // like headers in HTTP
"example-field": "example-value",
"supports-nesting": {
"yes": true,
"no": false
}
}
}
}
```### ACK
```json
{
"jtp": {
"version": "0.1.0",
"type": "ack" // therefore coming from a server
},"host": {
"os": {
"host-triple": "x86_64-windows-msvc",
"distro": "windows-10-22h2"
},
"net": {
"ipv4": "1.2.3.5",
"ipv6": "2001:0db8:85a3:0000:0000:0000:0000:0005"
}
},"payload": {
"head": {
"date": "2024-01-16 11:30:00 +0000",
"status": 200, // HTTP error code
"url": "https://example.com/jtp"
},
"body": "Hello from https://example.com/jtp!"
}
}
```