Project

General

Profile

Feature #26

JSON Model Field

Added by Stephen Burrows over 13 years ago. Updated over 13 years ago.

Status:
Resolved
Priority:
Normal
Category:
Core
Target version:
-
Start date:
10/07/2010
Due date:
% Done:

0%

Estimated time:

History

#1

Updated by Stephen Burrows over 13 years ago

  • Category set to Core
  • Status changed from New to Feedback
  • Assignee set to Joseph Spiros
  • Priority changed from Normal to High

Accidentally entered no description.
There is currently no concept of a JSON field in Philo core, except for a JSONField-like setup on the Attribute model. However, it may be necessary or useful in making edmonia to have JSON fields, for example for storing limitation restrictions. There are advantages and disadvantages to the JSONField approach. The advantages include being more maintainable over the long term and potentially having slightly better performance in some areas. The main disadvantage is that the raw JSON string would need to be accessed by ModelForms to offer an editable text field. However, this could be overcome by some extra json dumping and loading.
At its core, this may be a more aesthetic problem than a programmatic one. When I access the field on the model, should I get a JSON string? Or should I get the object that string represents? However, even if I fetch the string, the field should place a descriptor on the model class to handle conversion, perhaps based on a value passed in on init. Otherwise the process of using the field is more complicated than it need be.

#2

Updated by Stephen Burrows over 13 years ago

  • Priority changed from High to Normal

Added with commit 8c6ffb8e54f201a0fb7776fdd865bbbb3d42a29b

#3

Updated by Stephen Burrows over 13 years ago

  • Status changed from Feedback to Resolved
  • Assignee changed from Joseph Spiros to Stephen Burrows

Also available in: Atom PDF