Home  >  Q&A  >  body text

java - 使用fastjson对HashMap进行序列化错误

项目中使用fastjson对HashMap进行序列化和反序列化

//这个正常进行序列化和反序列化
HashMap<String, Integer> tempMap1 = new HashMap<String, Integer>();
//这个反序列化后数据丢失  
HashMap<String, HashMap<String, Integer>> tempMap2 = new HashMap<>();
黄舟黄舟2743 days ago576

reply all(1)I'll reply

  • PHP中文网

    PHP中文网2017-04-18 10:52:50

    Please complete the question

    1. How to serialize and deserialize

    2. What data was lost

    reply
    0
  • Cancelreply