aboutsummaryrefslogtreecommitdiffstats
path: root/packages/json-schemas/README.md
blob: e9f80e10632be4ca29dc5bb06c3ee6c3549d27d8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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
```