Rendering select2attrs as unicode or json based on type