Testdrive - change serialization format to json

Use json as the preferred format when serializing datastructures.
On read, legacy format is automagically detected and decoded, while
writing data always uses JSON.