Changes between Version 4 and Version 5 of Ticket #32135, comment 2


Ignore:
Timestamp:
Oct 23, 2020, 3:18:14 PM (4 years ago)
Author:
Michael Anuzis

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #32135, comment 2

    v4 v5  
    55Is there a reason `json` was permitted via workaround in 3.0 and appears forcefully disabled in 3.1?  Is there another option suggested for Django applications that need to preserve the sequence of similar data structures, and where a format like JSON appears to be the cleanest & simplest option for doing so?
    66
    7 Context: Not an expert on `json` or `jsonb` and didn't know the difference existed until I discovered a bug where `jsonb` loses the sequence of data deliberately stored via OrderedDict.  Not the only person with this need looking for a solution online, the stackoverflow workaround suggested earlier appeared to solve the issue cleanly for ~50-80 developers in a similar spot.
     7Context: Not an expert on `json` or `jsonb` and didn't know the difference existed until I discovered a bug where `jsonb` loses the sequence of data deliberately stored via OrderedDict.  Not the only person with this need looking for a solution online, the stackoverflow workaround suggested earlier appeared to solve the issue cleanly.
    88
    99In my case, I don't need to query/filter against any subfields within the JSON via Django's ORM and one potential workaround would be using a TextField and manually processing every interaction with json.loads() & json.dumps() since this workaround is only needed in 1 place of the app, and while preserving sequence is critically important it's a low frequency interaction and performance would be fine. It'd be nice if Django could support preserving the sequence of objects stored via JSON, but if version3.1 going forward strictly forbid a workaround that worked up to 3.0 it would help to know so I can put in the work now switching this instance to a TextField and moving on to 3.1.  Appreciate any guidance you can provide.
Back to Top