Update API to include flag for optional encoding of each literal type