added json parsing function for camera state