refator format size to json.