aboutsummaryrefslogtreecommitdiffstats
path: root/packages/json-schemas/README.md
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2017-11-14 08:32:01 +0800
committerBrandon Millman <brandon.millman@gmail.com>2017-11-14 22:42:50 +0800
commit56b5619d24b44d23f770b58b0c9e1d4a63b89aca (patch)
tree52c047aa9ce6dbd5af93f495dbb21a8c3a662a6f /packages/json-schemas/README.md
parent08963f269b543d0f6f125ff77efdda23339865ed (diff)
downloaddexon-sol-tools-56b5619d24b44d23f770b58b0c9e1d4a63b89aca.tar
dexon-sol-tools-56b5619d24b44d23f770b58b0c9e1d4a63b89aca.tar.gz
dexon-sol-tools-56b5619d24b44d23f770b58b0c9e1d4a63b89aca.tar.bz2
dexon-sol-tools-56b5619d24b44d23f770b58b0c9e1d4a63b89aca.tar.lz
dexon-sol-tools-56b5619d24b44d23f770b58b0c9e1d4a63b89aca.tar.xz
dexon-sol-tools-56b5619d24b44d23f770b58b0c9e1d4a63b89aca.tar.zst
dexon-sol-tools-56b5619d24b44d23f770b58b0c9e1d4a63b89aca.zip
Add json-schemas package to mono repo
Diffstat (limited to 'packages/json-schemas/README.md')
-rw-r--r--packages/json-schemas/README.md15
1 files changed, 15 insertions, 0 deletions
diff --git a/packages/json-schemas/README.md b/packages/json-schemas/README.md
new file mode 100644
index 000000000..e9f80e106
--- /dev/null
+++ b/packages/json-schemas/README.md
@@ -0,0 +1,15 @@
+Contains 0x-related json schemas
+
+## 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
+```