[Zope-dev] Schema to JSON

Martijn Faassen faassen at startifact.com
Mon Jun 29 04:26:50 EDT 2009


Hi there,

Paul Wilson wrote:
> I'm about to embark on a module to serialize Zope schemas into the JSON 
> format for my application, taking inspiration from z3c.schema2xml. I've 
> had a look around SVN to see if this functionality has already been 
> implemented but can't find anything - does anybody know whether this has 
> already been done somewhere?

I imagine lazr.restful hides functionality for this somewhere in its 
codebase. Perhaps one way forward would be to extract it? Maybe not, but 
it bears some investigation.

> Also, it makes sense in my mind for a schema2xml and schema2json to 
> implement the same interface. How does Zope handle this case? With a 
> format agnostic interface module or something?

I am not sure I understand the proposal. Which interface would be the 
same and why would that be useful?

I think you should just think in terms of what the API should be like 
before you worry about interfaces. (though interfaces are also used to 
look up adapters here).

Sounds like a useful project!

Regards,

Martijn



More information about the Zope-Dev mailing list