Pattern AST
  
          P| R=
           | repeated * reviewers
          P|     { \w+ } ,?
           | end
  
MatchLiteral 'R='
MatchRepeated    (name: reviewers)
    MatchValue    (anonymous, scalar)
        MatchRegex '\\w+'
    MatchRegex ',?'
Input String Captured JSON
R=foo
{
  "reviewers": [
    "foo"
  ]
}
Pattern AST
  
          P| R=
           | repeated * reviewers
          P|     { \w+ } ,?
           | end
  
MatchLiteral 'R='
MatchRepeated    (name: reviewers)
    MatchValue    (anonymous, scalar)
        MatchRegex '\\w+'
    MatchRegex ',?'
Input String Captured JSON
R=foo,bar
{
  "reviewers": [
    "foo", 
    "bar"
  ]
}

This HTML fragment was automatically generated from the test cases for JSON Pattern.