import com.jsonsfpme.JsonSfpMe; public class JsonParserExample { public static void main(String[] args) { String json = "{\"name\":\"John\", \"age\":30, \"city\":\"New York\"}"; JsonSfpMe parser = new JsonSfpMe(); JsonObject object = parser.parse(json); String name = object.getString("name"); int age = object.getInt("age"); String city = object.getString("city"); System.out.println("Name: " + name); System.out.println("Age: " + age); System.out.println("City: " + city); } }


上一篇:
下一篇:
切换中文