Added some tests for JSONMixin, and made JSONMixin comply with them