troubleshooting Question

Deserialize

Avatar of Peter Nordberg
Peter NordbergFlag for Sweden asked on
XMLASP.NETVisual Basic.NET
18 Comments1 Solution751 ViewsLast Modified:
Hi,

I need to deserialize the following JSON code that comes to a specified url on my asp.net website (I'm using vb.net). The serialized code I would like to add to an object so I can add each element to the database.

[{"email":"john.doe@sendgrid.com","timestamp":1337197600,"smtp-id":"<4FB4041F.6080505@sendgrid.com>","event":"processed"},{"email":"john.doe@sendgrid.com","timestamp":1337966815,"smtp-id":"<4FBFC0DD.5040601@sendgrid.com>","category":"newuser","event":"processed"},{"email":"john.doe@sendgrid.com","timestamp":1337969592,"smtp-id":"<20120525181309.C1A9B40405B3@Mohammeds-Mac.local>","event":"processed"},{"email":"bill.nye@thescienceguy.com","timestamp":1337971272,"smtp-id":"<20120525184109.9578F40409A5@Mohammeds-Mac.local>","reason":"Unsubscribed Address","event":"dropped"},{"email":"bill.nye@thescienceguy.com","timestamp":1337979680,"smtp-id":"<20120525210118.7F3724041B6D@Mohammeds-Mac.local>","reason":"Unsubscribed Address","event":"dropped"},{"email":"bill.nye@thescienceguy.com","timestamp":1337980426,"smtp-id":"<20120525211344.2844C4041EB2@Mohammeds-Mac.local>","reason":"Unsubscribed Address","event":"dropped"},{"email":"iamemail@gmail.com","attempt":"17","smtp-id":"<4FB29F5D.5080404@sendgrid.com>","timestamp":1337201407,"response":"501 Syntax error - Badly formatted address. ","event":"deferred"},{"email":"iamemail@gmail.com","attempt":"18","smtp-id":"<4FB29F5D.5080404@sendgrid.com>","timestamp":1337212247,"response":"Connection timed out","event":"deferred"},{"email":"iamemail@gmail.com","attempt":"25","smtp-id":"<4FB29F5D.5080404@sendgrid.com>","timestamp":1337288707,"response":"501 Syntax error - Badly formatted address. ","event":"deferred"},{"email":"john.doe@sendgrid.com","smtp-id":"<4FBFC0DD.5040601@sendgrid.com>","timestamp":1337966817,"response":"250 2.0.0 OK 1337966817 z9si3846029icy.10 ","category":"newuser","event":"delivered"},{"email":"john.doe@sendgrid.com","smtp-id":"<20120525183816.12AA6404092A@Mohammeds-Mac.local>","timestamp":1337971099,"response":"250 2.0.0 OK 1337971099 l10si4052001icz.31 ","event":"delivered"},{"email":"foobar@yahoo.com","smtp-id":"<20120525183951.59BEA4040968@Mohammeds-Mac.local>","timestamp":1337971198,"response":"250 2.0.0 OK 1337971198 xz10si2239282obb.108 ","event":"delivered"},{"email":"foobar@yahoo.com","smtp-id":"<20120525181029.220EE404043A@Mohammeds-Mac.local>","timestamp":1337969434,"status":"5.1.1","reason":"550 5.1.1 The email account that you tried to reach does not exist. Please try double-checking the recipient's email address for typos or unnecessary spaces. Learn more at http://support.google.com/mail/bin/answer.py?answer=6596 z6si25868142igk.15 ","type":"bounce","event":"bounce"},{"email":"john.doe@sendgrid.com","timestamp":1338574236,"url":"http://www.sendgrid.com","event":"click"},{"email":"john.doe@sendgrid.com","timestamp":1338572978,"url":"http://www.sendgrid.com","event":"click"},{"email":"john.doe@sendgrid.com","timestamp":1338595596,"url":"http://www.sendgrid.com","event":"click"},{"email":"john.doe@sendgrid.com","timestamp":1338312226,"newsletter":{"newsletter_user_list_id":"1695412","newsletter_id":"310318","newsletter_send_id":"425605"},"category":["dsfdsf","Newsletter"],"event":"open"},{"email":"john.doe@sendgrid.com","timestamp":1338487320,"event":"open"},{"email":"john.doe@sendgrid.com","timestamp":1338578578,"event":"open"},{"email":"john.doe@sendgrid.com","timestamp":1340126539,"newsletter":{"newsletter_user_list_id":"1695412","newsletter_send_id":"478915","newsletter_id":"428128"},"category":["TESTt","Newsletter"],"event":"unsubscribe"},{"email":"john.doe@sendgrid.com","timestamp":1338310756,"newsletter":{"newsletter_user_list_id":"1695100","newsletter_send_id":"425584","newsletter_id":"331537"},"category":["TEST","Newsletter"],"event":"unsubscribe"},{"email":"john.doe@sendgrid.com","timestamp":1340126539,"newsletter":{"newsletter_user_list_id":"1695412","newsletter_send_id":"478915","newsletter_id":"428128"},"category":["TESTt","Newsletter"],"event":"unsubscribe"},{"email":"mysendgriid@hotmail.com","event":"spamreport","timestamp":1347307636,"category":["board_collaborator_new_pin"],"unique_args":{"tracking_id":"c99z72cd5537515d9b0e3d8cab1ec09e","time_sent":1346814447,"sender_username":"notasendr","recipient_username":"realusername"}}]

Is there any of you experts that can show me how to accomplish this?!

Thanks for help!

Peter
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 18 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 18 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros