Created
April 30, 2013 19:55
-
-
Save psftw/5491435 to your computer and use it in GitHub Desktop.
java Properties escaping
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ jython | |
Jython 2.5.2 (Release_2_5_2:7206, Mar 2 2011, 23:12:06) | |
[Java HotSpot(TM) 64-Bit Server VM (Sun Microsystems Inc.)] on java1.6.0_38 | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> test = "key=http\:\/\/example.com/?urlkey\=urlval" | |
>>> import java.util.Properties | |
>>> p = java.util.Properties() | |
>>> import java.io.StringReader | |
>>> sr = java.io.StringReader(test) | |
>>> p.load(sr) | |
>>> p | |
{key=http://example.com/?urlkey=urlval} | |
>>> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment