JSON File Parser & Reader In Pure JavaScript – iojson

Category: Javascript | September 27, 2019
Author:itibbers
Views Total:270 views
Official Page:Go to website
Last Update:September 27, 2019
License:MIT

Preview:

JSON File Parser & Reader In Pure JavaScript – iojson

Description:

iojson is a tiny JSON parser & reader that allows you to import and export JSON data on the client-side.

How to use it:

Download and import the iojson in the document.

import iojson from './src/index.js'

Initialize the library and we’re ready to go.

window.iojson = iojson

Export your data into a JSON file.

const data = {
      name: 'itibbers',
      work: 'frontend'
}
iojson.exportJSON(data, 'myFileName')

Parse data from a file and print the JSON data in the console.

const res = await iojson.importJSON()
console.log(res)

You Might Be Interested In:


Leave a Reply