https://linen.dev logo
#help
Title
# help
p

Pradeep Vegesna

02/01/2024, 3:14 PM
Here is the error screenshot
@Tom @Lee Turner Can you please help
t

Tom

02/05/2024, 8:27 AM
Hi Pradeep, did you see this when you saved the stub? And what steps had you taken prior to this?
p

Pradeep Vegesna

02/07/2024, 12:41 AM
Hi @Tom, Yes I get this error when I am trying to save the stub. I was able to save the stub successfully when I select the Body as Equal to Json from the drop down. But I want to receive the response even if the fields in the payload matches and not only for the exact values. so I tried to select "matches" from the drop down and when I hit Save, I got this error
t

Tom

02/07/2024, 9:30 AM
matches
uses regular expressions so I suspect what this message is telling you is that there are symbols (or combinations) in there that aren’t valid
If you want to match a JSON document then
equalToJson
is definitely the way to go.
p

Pradeep Vegesna

02/07/2024, 10:45 AM
I dont want to match all the keys and values in the JSON. I just want to make sure that only keys are matching and the values can be any. In that case also, equal to Json is the only way?
t

Tom

02/07/2024, 11:59 AM
It's probably still the best way if you use placeholders for the values
p

Pradeep Vegesna

02/07/2024, 12:00 PM
ok, Thank you @Tom
2 Views