Generate json with name link referece instead of id if pretty printing