Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeBinderException: Operator '==' cannot be applied to operands of type 'Newtonsoft.Json.Linq.JValue' and 'string' #65

Open
AsmitaK-irisdame opened this issue Sep 21, 2022 · 0 comments

Comments

@AsmitaK-irisdame
Copy link

AsmitaK-irisdame commented Sep 21, 2022

RazarPay SDK Issue:

@razorpay

Error :
"ClassName": "Microsoft.CSharp.RuntimeBinder.RuntimeBinderException",
"Message": "Operator '==' cannot be applied to operands of type 'Newtonsoft.Json.Linq.JValue' and 'string'",

private List<Entity> Build(dynamic response)
{
       List<Entity> entities = new List<Entity>();
       if (response["entity"] == "collection")
       {
           foreach (dynamic item in response["items"])
           {
                entities.Add(ParseEntity(item));
           }
       }
       else
       {
           entities.Add(ParseEntity(response));
       }
       return entities;
}

The above Method present in Entity.cs class.
if (response["entity"] == "collection") This line throwing the error from RazarPay SDK

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

No branches or pull requests

1 participant