v1/reporting/transactions What C# object used to convert json?

CKdev
Contributor
Contributor

I am calling v1/reporting/transactions and getting a valid JSON string back. I would like to  convert this to the correct C# object type but I am unable to find any type that matches? Any idea what this type is? I would be a list of transaction_info objects.

 

Login to Me Too
1 REPLY 1

CKdev
Contributor
Contributor

I was not aware that Visual Studio had a means of generating C# classes from JSON.

  • Using "page_size" of 1 I copied the return JSON to clipboard. This way I only had 1 JSON object to deal with.
  • Edit->Paste Special->Paste JSON As Classes. This ended up making all the classes I needed.
  • Changed my cast type from string to the new classes generated and everything seems to be working.

 

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.