Issue #44 open

Serialized output should be ordered according to fields-definition

Seph Soliman
created an issue

I've defined the following fields to be output:



class MediaHandler(AnonymousBaseHandler): model = Media fields = ('id', 'def_type', 'title', 'description', 'tags', 'formats', 'thumbnails', 'files', 'def_media')


However, the fields are not outputted in that order but like this: {{{


"files": [ { "format": "Unknown format", "size": 19496210 } ], "description": "Michael underviser", "tags": [ { "count": null, "name": "guitar" }, { "count": null, "name": "michael" }, { "count": null, "name": "stuff" }, { "count": null, "name": "undervisning" } ], "title": "Guitar und(...)" }}}

This really isn't an issue for me other than when I'm debugging the output (i'd love to have id, type and title to be first). For XML this may be relevant for others to have it ordered in a certain way.

Since the fields are specified using tuples, we should be able to order them the same way they were specified.

Comments (4)

  1. Log in to comment