Closed
Description
Hi,
Is there a way to match that json property can be an object matching my matcher AND can also be null:
{
"id": "@integer@",
"title": "@string@",
"image": {
"title": "@string@",
"alt": "@string@",
"url": "@string@.isUrl()"
},
"content": "@string@",
"description": "@string@",
"cookTime": "@integer@",
"preparationTime": "@integer@",
"coverNumber": "@integer@",
"ingredients": "@string@",
"type": "recipe"
}
But my image object can be null like this:
{
"id": "@integer@",
"title": "@string@",
"image": null,
"content": "@string@",
"description": "@string@",
"cookTime": "@integer@",
"preparationTime": "@integer@",
"coverNumber": "@integer@",
"ingredients": "@string@",
"type": "recipe"
}
Thanks for your help