Create an Ordered JSONObject in Java

Why is it so complicated to create an ordered JSONObject?

Ryan James
Towards Data Science
4 min readMay 13, 2020

--

Photo by Micheile Henderson on Unsplash

When using a JSONObject in Java, you may notice that when you print out your objects, the order isn’t exactly what you expect.

All we have to do is change it to be ordered, right?

--

--

Director of Engineering @ Startup. Giving back to the dev community one article at a time! Need a website? https://ggilabs.com