Introduced typedef for rules template in json example.