https://github.com/karimsa/fldsmdfr
Rapid & secure communications module.
https://github.com/karimsa/fldsmdfr
client-server communication compression datagram fast iot json secure udp
Last synced: 3 months ago
JSON representation
Rapid & secure communications module.
- Host: GitHub
- URL: https://github.com/karimsa/fldsmdfr
- Owner: karimsa
- License: mit
- Created: 2017-03-08T05:17:48.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-09-26T19:39:07.000Z (over 7 years ago)
- Last Synced: 2025-03-11T21:03:58.070Z (3 months ago)
- Topics: client-server, communication, compression, datagram, fast, iot, json, secure, udp
- Language: JavaScript
- Homepage:
- Size: 177 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
![]()
fldsmdfrStrongly typed JSON.
## About
JSON is great for humans, sucks for storage. This tool is tasked at forcing APIs to strongly
type the parameters for their endpoints. This allows fldsmdfr to optimize all data sent over
the network in terms of space.## Usage
Install via `npm i --save fldsmdfr`.
Two methods: `BJSON.stringify()` & `BJSON.parse()` - designed to be as similar to the native
`JSON.*` methods as possible. The only difference is that it will required an extra parameter
which should be a type mapping.**Examples**
```javascript
BJSON.stringify({ msg: 'Hello, world' }, { msg: 'string' }) // returns a Buffer
``````javascript
BJSON.parse(``, { msg: 'string' }) // returns: { msg: 'Hello, world' }
```## License
Licensed under [MIT license](LICENSE.md).
Copyright © 2017-present Karim Alibhai.