pass JSON to callback