Test json objects.

Tests pass, but actual generation of json is utterly naive.