Skip to content

Conversation

@robinvdvleuten
Copy link

Hi there,

When testing my JSON OAuth responses, I tried to compare with the following pattern;

{
    "access_token": @string@,
    "expires_in": 3600,
    "token_type": "bearer",
    "scope": null,
    "refresh_token": @string@
}

Which gave me the error There is no element under path [scope] in pattern..

To fix this, I came up with a NullMatcher so that the following pattern can be used;

{
    "access_token": @string@,
    "expires_in": 3600,
    "token_type": "bearer",
    "scope": @null@,
    "refresh_token": @string@
}

norberttech added a commit that referenced this pull request Jun 19, 2014
A null value can be matched.
@norberttech norberttech merged commit 70f00bc into coduo:master Jun 19, 2014
@norberttech
Copy link
Member

Awesome, thanks @robinvdvleuten ! 🍻

@robinvdvleuten
Copy link
Author

You're welcome!

@defrag
Copy link
Member

defrag commented Jun 19, 2014

Thx @robinvdvleuten :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants