json parsing

replaced manual string substitutions and splitting with son parsing