Changes between Version 1 and Version 2 of Ticket #32135, comment 2


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

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #32135, comment 2

    v1 v2  
    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 existed where `jsonb` was losing 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 for ~50-80 developers in a similar spot.
    88
    99In my case, I don't need to query/filter against any subfields within the JSON 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 won't suffer much. 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