0.1.2-beta • Published 6 years ago
roidjson v0.1.2-beta
#Json-map
json-map at the very basic is a json data parser. It manipulates the structure of a json object or string, allowing you to Map parts "object, properties and values, of json with predefined meta values.
##Status : ALPHA NOT FULLY TESTED
##Usage JSON-map is made up of two important parts which includes the interface that describes the meta charactes and the entry point which runs the program
To run the module use
const jsonMap = require("jsonMap");
const jsonMapInterface = jsonMap.
.
const transform = require("./index").transformJson;
const transformInterface = require("./index").delimeterInterface;
//console.log( delimeter instanceof transformInterface);
const json = {
"sammy": {
"username": "SammyShark",
"location": "Indian Ocean",
},
"jesse": {
"username": "JesseOctopus",
},
"jamie": {
"username": "JamieMantisShrimp",
"jamie2": {
"username": "JamieMantisShrimp",
},
"location": "Pacific Ocean",
"online": true,
"followers": 654
}
};
//Inherit and override default delimeter
const delimeter = Object.create(transformInterface);
delimeter.beoreNode = " <blockquote> ";
delimeter.afterNode = "</blockquote> ";
delimeter.beforeSuit = "<ul>";
delimeter.afterSuit = "</ul>";
delimeter.beforeProperty = " <li> ";
delimeter.afterProperty = " </li> ";
delimeter.beforeValue = "";
delimeter.afterValue = "";
console.log(transform(json, delimeter));
##Contributors
##Change Log v1.0 : Initial release
##MIT Licenced
0.1.2-beta
6 years ago