fix the json post
fix the json post issue and added the loading spinner
function update