garycourt / JSV

A JavaScript implementation of an extendable, fully compliant JSON Schema validator.
618 stars 84 forks source link

trouble launching in browser #76

Closed jedierikb closed 11 years ago

jedierikb commented 11 years ago

Wanted to play with jsv.js in the console of the chrome browser, but I am not getting very far. With this html:

<html>
<head>
<script type="text/javascript" src="js/jsv.js"></script>
</head>
</html>

I tried this on the console (following your instructions in the README.md

var env = JSV.createEnvironment();
Error: Unknown Environment ID

How do I get this running in the console? Much thanks.

garycourt commented 11 years ago

If you look at the examples or tests folder, you'll see you need to load the other JS files:

<script type="text/javascript" src="../lib/uri/uri.js"></script>
<script type="text/javascript" src="../lib/uri/schemes/urn.js"></script>
<script type="text/javascript" src="../lib/jsv.js"></script>
<script type="text/javascript" src="../lib/json-schema-draft-03.js"></script>