You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by ZK <st...@gmail.com> on 2011/10/27 16:12:22 UTC

Re: BeanShell remove all chars -> '\' from json string

Hi,
if you have extracted the url into a variable /(i.e.: ${yourVar})/

*bshVar=vars.get("yourVar"); 
bshVar= bshVar.replace("\/", "/");  
vars.put("yourVar", bshVar);*




ZK

--
View this message in context: http://jmeter.512774.n5.nabble.com/BeanShell-remove-all-chars-from-json-string-tp4942943p4943093.html
Sent from the JMeter - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: BeanShell remove all chars -> '\' from json string

Posted by ZK <st...@gmail.com>.
Hi,
I forgot to escape a backslash!

I tried this /(in a beanshell post processor) /and it works for me /(I got
it down to 1 line):/

*vars.put("ItemData", vars.get("ItemData").replace("\\/", "/"));*



ZK

--
View this message in context: http://jmeter.512774.n5.nabble.com/BeanShell-remove-all-chars-from-json-string-tp4942943p4943274.html
Sent from the JMeter - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org