blotjson
blotjson is a tool to help you make sense of API responses by displaying JSON in a browser,
directly from backend code where the JSON is received
- There is no need to copy/paste or export your data
- Everything is done locally on your own computer
- An arbitrary number of JSON datum can be easily visualised
npm i --save-dev blotjson
const blot = require('blotjson');
blot.visualise(JSON.stringify(
{ 'bar': null, 'baz': 1.0 }
));
- visualise(jsonStr)
-
Displays json data in a browser
-
setPort(customPort) ⇒
Object
-
Sets the port of the server to a custom user-defined port
-
shouldOpenBrowser(bool) ⇒
Object
-
Configures whether the browser should open automatically
Displays json data in a browser
Kind: global function
Param | Type | Description |
---|---|---|
jsonStr | String |
Stringified JSON data to be viewed |
Sets the port of the server to a custom user-defined port
Kind: global function
Returns: Object
- Object whose keys point to the blot functions, to allow function chaining
Param | Type | Description |
---|---|---|
customPort | Number |
Port which the user wants to use for the network connection between browser and server. Default port of 9101 will be used if not provided by user. Port value must be at least 1024 |
Configures whether the browser should open automatically
Kind: global function
Returns: Object
- Object whose keys point to the blot functions, to allow function chaining
Param | Default | Description |
---|---|---|
bool | true |
Whether the browser should open automatically |
The design of displaying the data is in part inspired by Swagger