Special JSON array of special bracket

	@Test
	public void demo93() throws Exception {
		String str = "[\"a\", \"b\", \"c\"]";
		//Generate json arrays
		JSONArray createArray = new JSONArray();
		createArray.put("a");
		createArray.put("b");
		createArray.put("c");
		System.out.println("createJSONArray: " + createArray);
		//Parsing json arrays
		JSONArray parseArray = new JSONArray(str);
		System.out.println("parseJSONArray: " + parseArray);
		for(int i = 0; i < parseArray.length(); i++) {
			System.out.print(parseArray.get(i) + " ");
		}
	}

Output:


Read More: