Working on Callback function

Im running into an error with the json encodding.