For what it's worth, here are some of the decisions that I made in the serializer I linked to above.
- m2m values are serialized as comma separated values surrounded by brackets, like Python lists: "[1, 2, 3]" - The Python contstants True, False, and None are serialized as the strings "True", "False", and "None" respectively - The strings "True", "False", and "None" are serialized as the strings "'True'", "'False'", and "'None'" respectively - Multiple models can be serialized into a single stream, with header lines for each - The first line of a CSV stream must be a header line - The first two column headers are always 'pk' and 'model'. These are followed by the model's field names Based on Russell's enumeration of the various issues above, I can see how this approach is far from ideal. It makes a lot of assumptions that preclude it from being a general soultion. But it suits my needs and passes all the Django regression tests. :) -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.
