added JsonFormatter class and tests

Closes #36.

Couldn't inject custom serializer which would pretty print, because it contains "\n" symbols and query could not be executed.