parsing json commands