handler to dump current structure as json