jsonschema
2008/08/04 @ 20:27jsonschema is a validator for JSON Schema written in Python. It's based on the JSON Schema Proposal Second Draft. It supports a number of ways to extend JSONSchema by adding new properties and overriding default validation of existing properties.
Website: http://code.google.com/p/jsonschema
Download: jsonschema-0.1a.tar.gz
Source Code: http://hg.monologista.jp/json-schema
Documentation: jsonschema (version 0.1a) documentation
JSON Schema's purpose is to allow validation of JSON documents much like XML Schema, DTD. You can use it to define what kind of data should be present in the document as well as the structure of the data. You might have some JSON for a contact like so:
| { | |
| "name": "Ian Lewis", | |
| "email": "IanLewis@xyz.com", | |
| "address": "123 Main St.", | |
| "phone": "080-1942-9494" | |
| } |
And you could describe this in JSON Schema with the following:
| { | |
| "type":"object", | |
| "properties":{ | |
| "name": {"type":"string"}, | |
| "age": {"type":"int", "optional":True}, | |
| "email": { | |
| "type":"string", | |
| "pattern":"^[A-Za-z0-9][A-Za-z0-9\.]*@([A-Za-z0-9]+\.)+[A-Za-z0-9]+$" | |
| }, | |
| "address": {"type":"string"}, | |
| "phone": {"type":"string"} | |
| } | |
| } |
This can be validated with something like the following Python code:
| import jsonschema, simplejson | |
| data = """{ | |
| "name": "Ian Lewis", | |
| "email": "IanLewis@xyz.com", | |
| "address": "123 Main St.", | |
| "phone": "080-1942-9494" | |
| }""" | |
| schema = """{ | |
| "type":"object", | |
| "properties":{ | |
| "name": {"type":"string"}, | |
| "age": {"type":"int", "optional":True}, | |
| "email": { | |
| "type":"string", | |
| "pattern":"^[A-Za-z0-9][A-Za-z0-9\.]*@([A-Za-z0-9]+\.)+[A-Za-z0-9]+$" | |
| }, | |
| "address": {"type":"string"}, | |
| "phone": {"type":"string"} | |
| } | |
| }""" | |
| x = simplejson.loads(data) | |
| s = simplesjson.loads(schema) | |
| jsonschema.validate(x,s) |
It can be easily extended to include support for new properties or to override the default validation for standard properties so I think it could be used for a wide range of applications.
TextTools Plugin
2007/06/16 @ 02:34The TextTools plugin is a plugin for jEdit that provides a set of actions for manipulating text in a buffer. I have taken over maintenance of the plugin and will be fixing bugs and cleaning up the code moving forward.
| Website: | http://plugins.jedit.org/plugins/?TextTools |
| Download: | TextTools-1.14-bin.zip |
| Code: | http://jedit.svn.sourceforge.net/viewvc/jedit/plugins/TextTools/ |
Lightbox Plugin
2007/05/17 @ 15:42| Website: | http://manual.b2evolution.net/Plugins/lightbox_plugin |
| Download: | lightbox_plugin-1.3.zip |
| Code: | http://evocms-plugins.svn.sourceforge.net/viewvc/evocms-plugins/lightbox_plugin/ |
Gallery2 Plugin
2007/05/16 @ 23:20The Gallery2 Plugin is a plugin for the b2evolution blogging platform that enables this site, and any other b2evolution/Gallery2 site to have single sign on between the gallery and b2evolution.
The plugin supports a number of features such as adding Gallery2 photos to b2evolution posts by selecting them with the Gallery2 Image Chooser, adding image block widgets to the blog sidebar (random image, most recent image, daily image and more), and good integration with other plugins such as the TinyMCE plugin and lightbox plugin.
| Website: | http://manual.b2evolution.net/Plugins/gallery2_plugin |
| Download: | gallery2_plugin-1.4.zip |
| Code: | http://evocms-plugins.svn.sourceforge.net/viewvc/evocms-plugins/gallery2_plugin/ |
jsXe
2003/05/16 @ 21:09|
jsXe is the Java Simple XML Editor. jsXe is a fast, intuitive, scalable, platform-independent XML editor. It is written in Java using the Swing toolkit, and Xerces-J and is released under the terms of the GNU General Public License. It aims to provide end users and developers with an intuitive way of creating XML documents that is simple enough to deal with any XML document but flexible to allow the addition of support for XML document formats through the use of plugins. I started jsXe as a project in college and maintained it after college for a number of years. Though after coming to Japan I haven't had much time to maintain it.
|
prefix
2003/05/14 @ 21:57|
prefix is a command line calculator that evaluates expressions in prefix notation (polish notation) written in Python. It supports basic arithmetic operations, exponents, and logarithms. prefix was a hobby project to learn and play around with the Python programming language. It's currently not being maintained.
|









