[Service] Check if the response is valid json (Fixes #24)

This PR fixes # 24