Unable to parse JsonPredicate

When adding trigger for in-app automation based on custom event, I receive JSON containing empty predicate which results with parsing error. Here is the problematic part of JSON:

"triggers":[
{
"predicate":{
"or":[
{
"and":[
{
"ignore_case":true,
"value":{
"equals":"home_visit"
},
"key":"event_name"
},
{
"and":[]
}
]
}
]
},
"goal":1,
"type":"custom_event_count"
}
]

The error that occurs:

Caused by: java.lang.IllegalArgumentException: Predicate must contain at least 1 matcher or child predicate.
at com.urbanairship.json.JsonPredicate$Builder.build(JsonPredicate.java:231)

It occurs on this empty "and"

Didn't find what you were looking for?

New post

Comments

0 comments

Please sign in to leave a comment.