Ordered JSONObject

后端 未结 3 629
有刺的猬
有刺的猬 2020-12-03 09:38

I have a servlet which talks with the database then returns a list of ordered (ORDER BY time) objects. At the servlet part, I have

                //access DB, r         


        
3条回答
  •  一个人的身影
    2020-12-03 09:56

    As JSONObject is order less and internally uses Hashmap. One way to use it to download the all classes from org.json and use in your project directly by changing the internal HashMap implementation to LinkedHashMap in JSONObject.java file. below is the sorted json files https://github.com/abinash1/Sorted-Json-Object

提交回复
热议问题