@SrinidhiM As i mentioned above.. It worked in 7.3.1 and recently upgraded to 8.7.3 where pxObjClass is started appearing in the response .I was looking for ,Is it a bug in 8.7.3 ? what is the reason for changing this behaviour in pega 8.7.3.
You can use the JSON data transform in the response and use map all data and select the exclude properties option in the second tab of the json where you can give pxobjclass. This removes the pxObjClass from json response.