valid-json

1.0.3 • Public • Published

node-valid-json

Recursively validate format of all JSON files in a directory.

Acquire a list of all JSON files which are not formatted correctly

dir = 'json/schemas'
validator = require 'valid-json' 
validator.validate dir
  .then (invalids) -> console.log(invalids.length"invalid json files")
  .catch (error) -> "error traversing schemas directory:"error"\nstack:\n"error.stack

Readme

Keywords

Package Sidebar

Install

npm i valid-json

Weekly Downloads

0

Version

1.0.3

License

none

Last publish

Collaborators

  • buzuli