Adding JSONObjectFactory and tests.
Working on the HTTP API in the core.