Returns a composed constraint that represents a logical AND of this constraint and another.
If the composed constraint would be unsatisfiable, an Error
is thrown.
a constraint that will be logically-ANDed with this constraint
a composed constraint that represents a logical AND of this
constraint and the other
constraint
Require a value at a specific position in the JSON object.
The pointer
is a
JSON Pointer
syntax reference locating the value
in the JSON object. If
the pointer
parameter cannot be parsed as a JSON pointer an
Error
is thrown.
The function returns a new PartialJSON object. The original object remains unmodified.
the pointer expression
the value
the optional type of the value
a new constraint
Require a specific position in the JSON object to be empty.
The pointer
is a
JSON Pointer syntax
reference that should have no value in the JSON object. If the
pointer
parameter cannot be parsed as a JSON pointer an
Error
is thrown.
The function returns a new PartialJSON object. The original object remains unmodified.
the pointer expression
a new constraint
A constraint requiring the current value of the JSON topic to match the partially described value.
The code:
const factory = diffusion.updateConstraints(); const constraint = factory.jsonValue().with('/id', idValue).without('/cancellation');
creates a constraint for a JSON object with a specific ID value and no value for a 'cancellation' property.
6.2