Mar 13, 2019 #1 csupriest Programmer Jan 25, 2006 5 US I would like parse this string. I would like to pull out this value e1fc5ca6-e2e0-3a4d-9e03-73be39e2c4d1 {"access_token":"e1fc5ca6-e2e0-3a4d-9e03-73be39e2c4d1","scope":"am_application_scope default","token_type":"Basic","expires_in":3406}
I would like parse this string. I would like to pull out this value e1fc5ca6-e2e0-3a4d-9e03-73be39e2c4d1 {"access_token":"e1fc5ca6-e2e0-3a4d-9e03-73be39e2c4d1","scope":"am_application_scope default","token_type":"Basic","expires_in":3406}
Mar 13, 2019 #2 mikrom Programmer Mar 27, 2002 2,985 SK And what is that enclosed in {...} ? Is it a dictionary or JSON or a string ? When it is a dictionary [tt]my_dictionary = { "access_token":"e1fc5ca6-e2e0-3a4d-9e03-73be39e2c4d1", "scope":"am_application_scope default", "token_type":"Basic", "expires_in":3406 }[/tt] then you will get the value [tt]"e1fc5ca6-e2e0-3a4d-9e03-73be39e2c4d1"[/tt] with [tt]my_dictionary["access_token"][/tt] Upvote 0 Downvote
And what is that enclosed in {...} ? Is it a dictionary or JSON or a string ? When it is a dictionary [tt]my_dictionary = { "access_token":"e1fc5ca6-e2e0-3a4d-9e03-73be39e2c4d1", "scope":"am_application_scope default", "token_type":"Basic", "expires_in":3406 }[/tt] then you will get the value [tt]"e1fc5ca6-e2e0-3a4d-9e03-73be39e2c4d1"[/tt] with [tt]my_dictionary["access_token"][/tt]
Mar 25, 2019 #3 Moregelen Programmer Sep 10, 2012 1,222 US The easiest way to parse JSON is with Newtonsoft (one of the most popular nuget packages): https://www.newtonsoft.com/json Upvote 0 Downvote
The easiest way to parse JSON is with Newtonsoft (one of the most popular nuget packages): https://www.newtonsoft.com/json