Click here to Skip to main content
15,849,130 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
how to remove special characters in json string ,special charcters like square boxes....pls let me know the solution .. any one ...
Posted
Comments
Yuri Vital 19-Jul-11 3:37am    
What have you tried ?

1 solution

The square boxes as you call them are most likely caused by special characters being encoded in the JSON string.

Your not giving many clues as how you are getting the data into the string, what the string looks like, or how you are trying to use the string in your app, making it difficult to give any specific answer.

Pass the string through a function to cleanse is an option depending on how you are trying to do things.

If you are using the JSON javascript library, there in the stringify and parse methods there is an optional callback replacer and reviver where you can pass the string through to special functions to do any custom operations.

See; http://www.json.org/js.html[^]
 
Share this answer
 
Comments
komalilella 19-Jul-11 4:43am    
hi daveAuld..
actually what i did means, i consume one rest based json service in c#.at that time i got json string.but that json string with special characters..
now iam doing deserealize that json string using key value pair but how will do.i don't know..
i retreive the json string in textbox.

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