I want to send few dictionaries from django to android through HTTP after getting query in HTTP get. How can I do this and what formatting should I use?
I currently respond using HttpResponse. Name of keys are constant.
I want to send few dictionaries from django to android through HTTP after getting
Share
Read about serializing objects in django.
You can choose between xml, json or yaml. It’s pointless to add documentation here. Goto the link.
EDIT: Django’s doc is really nice. Example shouldn’t really be needed. But, still, an example from one of my projects [Line 492-507 from views.py].