Reputation: 89
I have a string In the pattern
a:22:{s:10:"identifier";s:17:"12345678912345678";s:10:"URL";s:0:"";s:10:"profile";s:62:"https://www.xyz.com//";}
I want to remove the string count like s:10 or s:17 from this string so i can decode it in JSON
Upvotes: 0
Views: 77
Reputation: 5889
This is not JSON and shouldn't hence be decoded as JSON. This is a serialized string using PHPs serialize()
function. To "decode" this string use the unserialize()
function of PHP.
Upvotes: 3