Check the specs for JSON-G here
There's no decoding function yet but it's late and I'm tired
Have you ever wanted to store an image in a .json format?
Have you ever wanted to store it in an extremely inefficient way?
Have you ever wanted to use a converter that's probably poorly optimized and buggy?
Now you can!
Turn any supported image (jpg, png, gif [haven't tested this rip]) into a poorly optimized .jsnp format!
const jsong = require('../index.js')
const fs = require('fs')
//Encoding demo.png to demo.jsng
jsong.encode('./demo.png', 'Hello World!')
.then(file => fs.writeFile('demo.jsng', JSON.stringify(file, null, 4), err => {if(err) throw err}))
As simple as that.
jsong.encode(image, comment)
Encode the image, uses promises because they're the future!
Param | Type | Description |
---|---|---|
image | path, http url, data url | The image to encode into the superior json-g format |
comment | String | The comment to add to the image (Default: '' ) |
Return a promise with the encoded image as an object
jsong.decode(image)
//TODO: All this
Do you mean the code or the format? Because they both suck.
probably not
see above
Easy!
Step 1. Question why do you want this
Step 2. Leave this page before it's too late
because we must prove that js and json can do anything
yes because i suffered and wrote this instead of you
If it's buggy and returns the wrong thing or crashes, just open an issue and I'll get to it eventually
If you have an issue with how poorly written this code is or how terrible the format is, write your complaints in an angry .txt file on your desktop, then delete it.
I am not responsible for anything. Even if this package gains sentience and kills your family, not my fault. Blame Road for that.