1

i am writing a json schema, that validates files based on the sum of numbers, stored in a property of an object, e.g. example below. The Sum of A and B can not exceed 100%. Is there a schema/function that allows this kind of specification?

Thanks in advance

"blend": [
        {
            "name": "A",
            "amount": {
                "value": 10.0,
                "unit": "%"
            }
        },
        {
            "name": "B",
            "amount": {
                "value": 90.0,
                "unit": "%"
            }
        }
    ]
Nafeez Quraishi
  • 5,380
  • 2
  • 27
  • 34

0 Answers0