#4656: Allow In-depth serialization by specifying depth to follow relationship
---------------------------------------------+------------------------------
          Reporter:  jay.m.mar...@gmail.com  |         Owner:  nobody 
            Status:  new                     |     Milestone:         
         Component:  Serialization           |       Version:         
        Resolution:                          |      Keywords:  feature
             Stage:  Design decision needed  |     Has_patch:  0      
        Needs_docs:  0                       |   Needs_tests:  0      
Needs_better_patch:  0                       |  
---------------------------------------------+------------------------------
Changes (by russellm):

  * version:  SVN =>

Comment:

 @orokusaki: That's some might fine LISP you've written :-)

 Seriously - there's more to this problem than just specifying a tree of
 attributes to dump (although that is certainly part of the problem). The
 rendering format is also an issue. For example, should a foreign key be
 represented as:
 {{{
 {
    "pk": 1,
    "model": "app.foo",
    "fields": {
       "name": "first",
       "child": {
          "pk": 1,
          "model": "app.bar",
          "fields": {
             "attrib": 3
          }
       }
    }
 }
 }}}
 or
 {{{
 {
    "pk": 1,
    "model": "app.foo",
    "fields": {
       "name": "first",
       "child": {
          "pk": 1,
          "attrib": 3
       }
    }
 }
 }}}
 or
 {{{
 {
    "pk": 1,
    "name": "first",
    "child": {
       "pk": 1,
       "attrib": 3
    }
 }
 }}}
 or something else entirely? Different users will have different needs. And
 I haven't even started looking into the XML-related problems (what tag
 name do I use? Do I use an attribute or CDATA to represent content?)

 This isn't something we're going to be able to cram into the arguments of
 a single function. in order to give full customizability, we're going to
 need to provide a class-based mechanism for describing serialization.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/4656#comment:17>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.


Reply via email to