Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

parse this string

Status
Not open for further replies.

csupriest

Programmer
Jan 25, 2006
5
0
0
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}
 
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]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top