Some initial incomplete work on the new JSON interface implementation.

Serving mostly as a backup of this code.