obj2json in php was done
add judgement of paramters