Closed halindrome closed 2 months ago
Hmmm, I'm investigating this. The overall problem is that the JSON format itself states that the key order does not matter, so lots of api's for dealing with json also spec that the order is not guaranteed. That said, I am still looking into this to see what I can come up with.
Understood. One idea - there is the concept of 'canonical JSON' (https://www.rfc-editor.org/rfc/rfc8785). Many of the popular libraries for pretty printing know about canonical JSON. If you use that, then at least it will render the same way every time.
I've just submitted 2024.63 to Setapp which should resolve this. It generally takes about ~24 hours or so for a Setapp build to become available.
Thanks for the update!
On Jul 31, 2024 at 8:30:28 AM, Kyle Hankinson @.***> wrote:
I've just submitted 2024.63 to Setapp which should resolve this. It generally takes about ~24 hours or so for a Setapp build to become available.
— Reply to this email directly, view it on GitHub https://github.com/hankinsoft/SQLPro/issues/991#issuecomment-2260532161, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAD7D4DZLQICIFUAIVLAL7LZPDRHJAVCNFSM6AAAAABJEXV4TCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENRQGUZTEMJWGE . You are receiving this because you authored the thread.Message ID: @.***>
-- Shane McCarron @.***
This should now be available. If you get the chance, please give it a try and let me know if that sorts things for you.
It looks great - here is an example from a live system where very long fields now pretty print in the correct order
On Aug 1, 2024 at 8:13:32 AM, Kyle Hankinson @.***> wrote:
This should now be available. If you get the chance, please give it a try and let me know if that sorts things for you.
— Reply to this email directly, view it on GitHub https://github.com/hankinsoft/SQLPro/issues/991#issuecomment-2263010652, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAD7D4GEFDAWTN2Y54AZJ4DZPIX7ZAVCNFSM6AAAAABJEXV4TCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENRTGAYTANRVGI . You are receiving this because you authored the thread.Message ID: @.***>
-- Shane McCarron @.***
Great! I'm going to go ahead and close the issue. If you happen to get a chance, could you please consider leaving a rating/review on the Setapp store for SQLPro? As an independent developer, they help me out a ton.
Describe the bug If a field has contents that are "JSON" then the program will offer to pretty print the contents. However, when you do this, it will reorder the contents. In general, pretty printing should not change the order of the information.
To Reproduce Steps to reproduce the behavior:
Expected behavior The original order should be maintained.
Screenshots
Sure - here are some:
Environment details (please complete the following information):