This locale object acts much like the locale object from the readr package. It is used to provide direction to the formatting methods for classes of each individual memeber of the query-parameter list sent to serialize_list.

locale(logical_format = list(true = "true", false = "false"),
  dtime_format = c("ms", "s", "minute", "hour", "day", "week"))

default_locale()

Arguments

logical_format
list, with two members: true and false, character strings indicating how logicals are written.
dtime_format
character, indicating how to express time-differences. Using serialize_list, time-differences are indicated by using difftime, lubridate::duration, or lubridate::period. The options indicate which time unit to use, "ms" being the default. The output for time-differences is a character representation of the numeric value of the time-differences expressed using that unit.

See also

serialize_list

Examples

library("lubridate") query_params <- list( keep = TRUE, delay = dseconds(5) ) serialize_list(query_params)
#> $keep #> [1] "true" #> #> $delay #> [1] "5000" #>
locale_new <- locale( logical_format = list(true = "True", false = "False"), dtime_format = "s" ) serialize_list(query_params, locale = locale_new)
#> $keep #> [1] "True" #> #> $delay #> [1] "5" #>