Added JSON library and some simple tests.
Certainly not final, but more or less usable as is.