Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#12838 closed (wontfix)

Feature Request: Usable JSON-RPC API

Reported by: orokusaki Owned by: nobody
Component: Core (Other) Version: master
Severity: Keywords: json-rpc
Cc: Triage Stage: Design decision needed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

The existing JSON-RPC Django implementations out there are limited and hackish. I've experienced:

this one: http://code.djangoproject.com/wiki/JSONRPCServerMiddleware (which is simple but not very Django-ish as it uses )

and this one: http://code.djangoproject.com/wiki/JSON-RPC (which starts out with the right idea of using views, but doesn't seem to Djang-ish upon further investigation:

from jsonrpc import jsonrpc_site
import myproj.myapp.views # you must import the views that need connected into urls.py and what is jsonrpc_site?
urls += patterns('', (r'^json/', jsonrpc_site.dispatch))

I think that JSON-RPC is important enough for an official well architected / well documented implementation that works well within the normal functionality of Django but I'm not experienced enough to offer a solution. That said, I am willing to spend a couple weeks working on it, with direction from more experienced programmers on here. (Maybe the existing frameworks are great and I'm too much of an amateur to understand their architecture. If that is the case, let me know and I'll close this and shut up.

My only initial thoughts are:
1) Perhaps the API should allow for an API class of API methods and when you register the class the methods become available.
2) Maybe the focus should be less on JSON-2 or 1.1 specs (since there appears to be some ambiguity in that group anyways) and more on usability and flexibility.

Change History (5)

comment:1 Changed 5 years ago by orokusaki

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

I'm serious about contributing a lot of time to this with the advice of some pros so if this is the wrong place for this request, please help me before deleting it, as I would love to contribute.

comment:2 Changed 5 years ago by Alex

  • Triage Stage changed from Unreviewed to Design decision needed

I'm of the opinion that this shouldn't be something in Django itself, marking as DDN.

comment:3 Changed 5 years ago by orokusaki

If somebody with experience in this area can help me spec this out, I will build it. I can code and have quite a bit of OOP experience (ie, I write good code), but I have little JSON-RPC experience. Seeing how popular all API related technologies are becoming, it would be nice to have a well implemented well interfaced version.
.

The middleware version I mentioned doesn't allow for access to request so you get no easy session access, no URL based queries (like www.myapplicationsite.com/json/myaccountnumber/). Needless to say, this is not ideal.

comment:4 Changed 5 years ago by orokusaki

  • Resolution set to wontfix
  • Status changed from new to closed

After much searching, I've come across the holy grail: http://code.djangoproject.com/wiki/Jsonrpc. Closing this ticket.

comment:5 Changed 4 years ago by jacob

  • milestone 1.3 deleted

Milestone 1.3 deleted

Note: See TracTickets for help on using tickets.
Back to Top