简体   繁体   中英

Java + Django web service?

I am trying to start with development of java client + django web service.

There are few questions that are bothering me :

1) I would use gson lib for java, is there any de-serializer for django that is gson alike?

2) How POST mechanism is working with JSON ? I would use Apache, what is needed so I can make POST and how in general can you POST JSON ?

3) What is procedure for serverside django to catch JSON that is being POST-ed?

4) How does serverside service returns JSON to client?

5) (most confusing) How does auth methods work with all of the above?

Please don't respose with google it because I have google it around and I am still confused with some basic concepts.

  1. There are plenty of good python json libraries. The best ones are fairly simple. django actually HAS one built in, though I can't remember the name. something like django.json.
  2. you can POST and GET json by simply passing it in as a parameter in the request.
  3. A servlet that recognizes the json input parameter, gets the JSON and deserializes it for consumption by the server.
  4. write the JSON to the response as a name/value parameter pair.
  5. I don't have a good answer for this. Not sure I entirely understand what you are looking for.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM