Extracted JSON client functions into seperate package

Solves #317 
Originally it was used for the pinned.Config, and then I discovered that it doesn't work with Dialer, I could have reverted it, but decided to keep it since it breaks the function down into bite size chunks.