Skip to contents

Custom serializers

Usage

serializer_multi(serialize_fn, boundary = NULL, ...)

serializer_cadenza_enrichment_calculation(...)

serializer_cadenza_visualization(...)

Arguments

serialize_fn

Function with which the individual parts will be serialized. The function has to return a vector or list of strings and has to have the attribute type with the HTML content type of each part.

boundary

The boundary string with which the parts are to be separated. If NULL, a random string of 30 characters will be generated and used.

...

Additional arguments to be passed to the serialize function.

Functions

  • serializer_multi(): Serialize as multipart-form

  • serializer_cadenza_enrichment_calculation(): Serialize the multipart-form required by Cadenza for enrichments and calculations

  • serializer_cadenza_visualization(): Serialize the multipart-form required by Cadenza for visualizations

Examples

if (FALSE) {
pr() |>
  pr_get(
    "/form",
    handler = function() list(data.frame(x = rnorm(10), y = runif(10)),
                              list(param = "b", value = 12)),
    serializer = serializer_multi(
      serialiize_fn = function(val) lapply(val, )))
}