I have an a string like
String myString = "[\"One\", \"Two\"]";
I am struggling with figuring out how to turn it into an ArrayList with values "One" and "Two"
I tried using JSONArray
but it doesn't seem to work how I expected
EDIT:" When I print my string it actually prints without the \
System.out.println(myString)
prints:
["One", "Two"]
I tried
JSONArray jsonArr = new JSONArray(stringCharactersArray);
and got that the constructor can't take a string. I am using JSONArray from
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1.1</version>
</dependency>