vivocha/jsonschemer

Name: jsonschemer

Owner: Vivocha

Description: Automatically guesstimate a JSON Schema from the contents of a MongoDB collection

Created: 2016-05-03 10:14:09.0

Updated: 2016-05-05 09:25:53.0

Pushed: 2016-05-05 10:27:33.0

Homepage: null

Size: 6

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

jsonschemer

Automatically guesstimate a JSON Schema from the contents of a MongoDB collection

Installation
install jsonschemer
Usage
schemer [options] <db connection string> <collection>

Valid options are:

Example
schemer -q '{ "surname":"Smith" }' mongodb://10.0.0.1:27017/my_db users
Usage with Node.js

The exports of the library are a single function, accepting an options object and returning a promise resolved to the resulting JSON Schema.

Options can have the following properties:

Example
schemer = require('jsonschemer');

mer({
: 'mongodb://10.0.0.1:27017/my_db'
llection: 'users',
xEnum: 20,
 { surname: 'Smith' }
hen(function(schema) {
nsole.log(JSON.stringify(schema, null, 2));


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.