Some properties of a JSON payload may be difficult to know in advance. E.g. a timestamp or a UUID or other randomly assigned values.
Proposition
Allow for a string: "<<PRESENCE>>" to not be interpreted literally, but when found in the expected JSON, only check that there is some value for this key in the actual JSON.
If the expected JSON is:
{
"foo": "<<PRESENCE>>"
}
Then all of the below payloads will match, assuming it is still valid JSON.
Some properties of a JSON payload may be difficult to know in advance. E.g. a timestamp or a UUID or other randomly assigned values.
Proposition
Allow for a string:
"<<PRESENCE>>"
to not be interpreted literally, but when found in the expected JSON, only check that there is some value for this key in the actual JSON.If the expected JSON is:
Then all of the below payloads will match, assuming it is still valid JSON.
However, the following payloads should fail.
Approach
"<<PRESENCE>>"
keyword"<<PRESENCE>>"