You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+24-2Lines changed: 24 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -373,12 +373,14 @@ JSON Editor supports schema references to external URLs and local definitions.
373
373
}
374
374
```
375
375
376
-
Local references must point to the `definitions` object of the root node of the schema and can't be nested.
377
-
So, both `#/customkey/name` and `#/definitions/name/first` will throw an exception.
376
+
Local references must point to the `definitions` object of the root node of the schema.
377
+
So, `#/customkey/name` will throw an exception.
378
378
379
379
If loading an external url via Ajax, the url must either be on the same domain or return the correct HTTP cross domain headers.
380
380
If your URLs don't meet this requirement, you can pass in the references to JSON Editor during initialization (see Usage section above).
381
381
382
+
Self-referential $refs are supported. Check out `examples/recursive.html` for usage examples.
383
+
382
384
### hyper-schema links
383
385
384
386
The `links` keyword from the hyper-schema specification can be used to add links to related documents.
@@ -456,6 +458,26 @@ So, the final order of properties in the form (and in returned JSON data) will b
456
458
3. prop1 (order 1000)
457
459
4. prop3 (order 1001)
458
460
461
+
### Default Properties
462
+
463
+
The default behavior of JSON Editor is to include all object properties defined with the `properties` keyword.
464
+
465
+
To override this behaviour, you can use the keyword `defaultProperties` to set which ones are included:
466
+
467
+
```json
468
+
{
469
+
"type": "object",
470
+
"properties": {
471
+
"name": {"type": "string"},
472
+
"age": {"type": "integer"}
473
+
},
474
+
"defaultProperties": ["name"]
475
+
}
476
+
```
477
+
478
+
Now, only the `name` property above will be included by default. You can use the "Object Properties" button
479
+
to add the "age" property back in.
480
+
459
481
### format
460
482
461
483
JSON Editor supports many different formats for schemas of type `string`. They will work with schemas of type `integer` and `number` as well, but some formats may produce weird results.
0 commit comments