mirror of https://plugins.trac.wordpress.org/browser/json-api as-of v1.1.1, plus local modifications