Allow Objects and Arrays to be stored as JSON

Continued from #283

Messed up the previous pull request, so I've made a fresh clean one. This one also removes the `json` configuration directive, in favour of the automatic JSON object and array parsing.

README updated to reflect the new behaviour. Tests updated, and additional tests added to test new functionality.