09-10-2011 04:22 PM
I face a bit annoying problem with double quotes: I have JSON string with double quotes inside which causes incorrect parsing. So I want to completely remove them. I used
result_text = result_text.replace('"', '\"');
but no changes. I searched a bit and found that people use replace(String, String) while I can see only one constructor with chars. To be general - how would you remove double quotes from a string?
Solved! Go to Solution.
09-11-2011 08:53 AM
Ok, I tested methods in this link, but still have problems with parsing json... Do you know how to change jdk to be able to use .replaceAll(String, String) method? Or what can be the problem with these string methods?
09-11-2011 10:14 AM
Take a look at net.rim.device.api.util.Stringutilities, this has the method removeChars.
09-11-2011 12:26 PM
thank you too I looked through this class, can be useful in some cases.
I also tried http://supportforums.blackberry.com/t5/Java-Develo
and to cut long story short - my problem with json happened to be far from quotes. I just have not worked with json parser before and attempted to get null value. Now I parse it properly