Click here to Skip to main content
15,891,864 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
["userid":"amir","domain":"xyz","channel":"abc","msgbody":"testiing here","fromid":"1"}]

how can i parse my this server response string.
i want to get just msg....
Posted

1 solution

You can do this easily with a regular expression[^] for instance:
"\"msgbody\":\"([^\"])\"
For conveniance the regular expression is already written as string literal.
Another alternative would be to use a JSON parser. There is a great article by Mehdi Golam[^] right here on CP: fastJSON[^].

Regards,

—MRB
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900