JSON File Parser & Reader In Pure JavaScript – iojson

Category: Javascript | November 16, 2020
Author:itibbers
Views Total:527 views
Official Page:Go to website
Last Update:November 16, 2020
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)

Changelog:

11/16/2020

  • refactor

You Might Be Interested In:


Leave a Reply