• fastjson


    <!-- https://mvnrepository.com/artifact/com.alibaba/fastjson -->
    <dependency>
    <groupId>com.alibaba</groupId>
    <artifactId>fastjson</artifactId>
    <version>1.2.75</version>
    </dependency>



    SysUser sysUser = new SysUser(12L); String ss = JSONObject.toJSONString(sysUser); System.out.println(ss); String aa = "{"admin":false,"params":{"admin":false,"params":{},"userId":4545},"userId":12}"; SysUser sysUser = JSON.parseObject(aa, SysUser.class); System.out.println(sysUser); String s = JSONObject.toJSONString(sysUser); System.out.println(s); ArrayList<String> strings = new ArrayList<>(); strings.add("aa"); strings.add("afd"); strings.add("adsfds"); strings.add("asdfdsa"); LinkedList<String> strings1 = new LinkedList<>(); strings1.add("sdfdsf"); strings1.add("sdfdsf"); strings1.add("sdfdsf"); strings1.add("sdfdfdsfds"); for (String string : strings1) { System.out.println(string); } JSONObject jsonObject = JSONObject.parseObject(aa); System.out.println(jsonObject.getString("userId")); System.out.println(jsonObject.getString("admin")); System.out.println(JSONObject.parseObject(jsonObject.getString("params")).getString("userId"));
  • 相关阅读:
    antd Upload的使用
    table 的使用方法
    标题前点的制作
    插件multiBtnList的使用
    render的写法
    数据请求
    实体类为什么使用包装类
    el-table中如何遍历数组中对象里的数组?
    关于hash的描述,hashcode etc
    Java集合框架详解
  • 原文地址:https://www.cnblogs.com/xiondun/p/14356960.html
Copyright © 2020-2023  润新知