0

Say I defined a data model in JSON. Is it possible to inline a piece of schema definition to this JSON document in order to validate some of the child elements in it?

Edit:

I found How to tell JSON schema validator to pick schema from property value? gave a solution to my question.

Community
  • 1
  • 1
miaobo
  • 1
  • 3
  • If you use a `describedby` link (that points to inside the data itself) it expresses what you want - but you'd need to make sure your validator supports that. – cloudfeet Sep 29 '15 at 16:45
  • Many thanks for the hint. Use this as keyword search I just found http://stackoverflow.com/questions/19416873/how-to-tell-json-schema-validator-to-pick-schema-from-property-value basically had answered the same question I had. So I would mark this as a duplicate to this one. – miaobo Oct 01 '15 at 09:55

0 Answers0