Do not use method object in statement

As it will always be != to json string.