Match String Syntax

Construct matchers on this syntactic template in JSON format.

Logical AND Syntax

field:value pairs are in curly braces and separated by commas). Each field name can appear at most once.

{"fieldname1":"value1" , ... , "fieldnameN":"valueN"}

Logical OR Syntax

A logical OR can be expressed in one of two ways:

  1. As a list of possible values for a given field.

{"f1": ["v1", "v2"]}
  1. As a list of valid matchers, which need not be related to each other, and each could be a logical OR.

[{"f1": "v1"}, {"f1": "v2"}, ..., {"f1": "vn", "f2": "w1"}]
[{"f1": ["v1", "v2"]}, [{"f2": "w1"}, {"f2": "w2"}]]

 

Other Syntax Rules

Logical AND as well as logical OR syntax follow these rules:

  • Enclose field names and string values in double-quote characters. You may precede quote characters with an escape character, as needed.
  • Do not enclose boolean tokens in double-quote characters.
  • Values can be long integers, strings, or the special boolean tokens true or false.
  • When value is a string, its maximum length is 256 characters (see Restrictions on Names).
  • Whitespace is ignored, except within double-quote characters.

Content Matcher: Match String Examples

{"Symbol":"TIBX"}
{"Symbol":"TIBX","Order":"Buy","Price":"Market"}
{"Item":"Book","Title":"The Power of Now"}
{"Answer":42}
{"MustHave":true,"MustNotHave":false,"MustBeZero":0}