added php logic for empty json objects
conflict resolved