aboutsummaryrefslogtreecommitdiffstats
path: root/packages/json-schemas/README.md
diff options
context:
space:
mode:
authorJacob Evans <dekz@dekz.net>2017-11-16 07:25:09 +0800
committerGitHub <noreply@github.com>2017-11-16 07:25:09 +0800
commitd7e5c6f9b5bbe4e9216d3a91ade71bfab7785cdd (patch)
tree4e1d4197d52203b648493301fe74e577e1d99e3e /packages/json-schemas/README.md
parent85c3b2996d7097f8d390f4b8f6199b983928defb (diff)
parent557faba31b149ab52f6cc4b1930f457205b00229 (diff)
downloaddexon-sol-tools-d7e5c6f9b5bbe4e9216d3a91ade71bfab7785cdd.tar
dexon-sol-tools-d7e5c6f9b5bbe4e9216d3a91ade71bfab7785cdd.tar.gz
dexon-sol-tools-d7e5c6f9b5bbe4e9216d3a91ade71bfab7785cdd.tar.bz2
dexon-sol-tools-d7e5c6f9b5bbe4e9216d3a91ade71bfab7785cdd.tar.lz
dexon-sol-tools-d7e5c6f9b5bbe4e9216d3a91ade71bfab7785cdd.tar.xz
dexon-sol-tools-d7e5c6f9b5bbe4e9216d3a91ade71bfab7785cdd.tar.zst
dexon-sol-tools-d7e5c6f9b5bbe4e9216d3a91ade71bfab7785cdd.zip
Merge branch 'development' into syncSubscribe
Diffstat (limited to 'packages/json-schemas/README.md')
-rw-r--r--packages/json-schemas/README.md24
1 files changed, 24 insertions, 0 deletions
diff --git a/packages/json-schemas/README.md b/packages/json-schemas/README.md
new file mode 100644
index 000000000..d89f57a5e
--- /dev/null
+++ b/packages/json-schemas/README.md
@@ -0,0 +1,24 @@
+json-schemas
+------------
+
+Contains 0x-related json schemas
+
+## Install:
+
+```bash
+npm install @0xproject/json-schemas --save
+```
+
+## Usage:
+```
+import {SchemaValidator, ValidatorResult, schemas} from '@0xproject/json-schemas';
+
+const {orderSchema} = schemas;
+const validator = new SchemaValidator();
+
+const order = {
+ ...
+};
+const validatorResult: ValidatorResult = validator.validate(order, orderSchema); // Contains all errors
+const isValid: boolean = validator.isValid(order, orderSchema); // Only returns boolean
+```