Added a small json encoder.  But I still need a json decoder.