[Webkit-unassigned] [Bug 56294] Web Inspector: migrate from Inspector.idl to InspectorAPI.json for protocol schema definition meta bug.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 14 07:57:13 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=56294





--- Comment #1 from Patrick Mueller <pmuellr at yahoo.com>  2011-03-14 07:57:13 PST ---
I have to admit, though I initially disliked using IDL the way Web Inspector uses it, I've grown to like it.  Very concise, human readable, and human writable.  Compare to JSON, which has none of those qualities.

I'd vote for leaving it has IDL, and adding more to it:

- describe all the data structures with the IDL
- documentation in comments preceding the interfaces, functions, and structures ala JavaDoc

But not a big deal either way.

For weinre, I'll likely continue using IDL for the interfaces that I've added, and change my IDL->JSON converter to generate JSON in whatever format you're generating.

I already have a python IDL to JSON converter, here:

   https://github.com/pmuellr/weinre/blob/master/weinre.build/scripts/simple-idl2json.py

I'd be happy to rewrite it into a format you need (my version does stuff that we won't presumably need for the WebKit version), or feel free to borrow concepts from it.  As I'm the only author of the file, I'd be happy to relicense it to just BSD, and put appropriate comments in it suitable for WebKit and post here for folks to work off of.  Let me know.

w/r/t python as the converter.  +1.  Downside is that the "json" module for python only showed up in Python 2.5.  If we still need to support Python 2.4, there are a couple options:

- import the simplejson package into WebKit and use it (the official json package for python IS simplejson)

- use python's "repr" function to generate JSON from python dictionaries - I think it will generate legal JSON for the limited needs here.  Likewise, I believe you can "eval" JSON in Python and get the appropriate thing read in.

Lastly, you should check with Joe Gregorio (Google Chapel Hill NC office), as he's working on the standardization of "Google Data APIs" or whatever, and will surely have some ideas for you.  I believe JSON is the common base they are working on also.

I guess I'd almost prefer we move to Protocol Buffers, as they seem to be a perfect fit for this problem.  Getting Protocol Buffers into WebKit seems like it might be difficult though.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list