Extracted JSON client functions into seperate package

Closes #317 
You could now use `newClientWithDialer`?