Consistently use db_to_json to convert from database values to JSON objects.#7849
Conversation
|
There are other instances of |
I decided to make this change, see 281d4de29eb776c28ce23d1c72bdeb4f1dc10e0b |
281d4de to
212e79d
Compare
212e79d to
fdd65df
Compare
db_to_json to convert from database values to JSON objects.
|
I suspect it would be nice to have a |
| # Avoid a circular import. | ||
| from synapse.storage._base import db_to_json |
There was a problem hiding this comment.
hrm. It's unsatisfactory if synapse.storage._base has a dependency on this file somehow. This is fine as a temporary solution though.
There was a problem hiding this comment.
synapse.storage._base imports from synapse.storage.database, which imports from synapse.storage.background_updater.
This removes the last usages of importing json from canonicaljson in order to get the simplejson package.This consistently uses the
db_to_jsonhelper in our storage code. So a follow-on to #7836 / #7802 and related to #7674.