import org.json.simple.JSONObject; public class Json { @SuppressWarnings("unchecked") public void convert() { JSONObject obj = new JSONObject(); obj.put("name", "Para Ferenc"); obj.put("city", "Szeged"); System.out.println(obj.toJSONString()); } }