add function to execute json.
remove old json submit code.