import java.io.*;  
import org.json.*;  
  
public class Demo {  
    public static void main(String[] args) throws Exception {  
        String str = "{\"a\":\"b\", \"c\":\"d\"}";  
        JSONObject a = new JSONObject(str);  
        System.out.println(a); // {"c":"d","a":"b"}  
        System.out.println(a.get("c")); // d  
    }  
}  

 

相关文章:

  • 2022-12-23
  • 2021-10-11
  • 2021-12-27
  • 2022-12-23
  • 2022-12-23
  • 2021-06-26
  • 2022-12-23
  • 2022-02-07
猜你喜欢
  • 2021-09-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-24
  • 2022-12-23
相关资源
相似解决方案