scm_ping: wrap code to function to be able to respond with json