begin of json implementation