validate function conflicts with jsonlite

I've updated to R 4.3.2 and Shiny 1.8.0. After the update, my validate() functions all throw errors (is.character(txt) is not TRUE). The problem is that the validate() function now is being drawn from the jsonlite package, which Shiny imports. Shiny imports jsonlite, and then the jsonlite version of validate() becomes the default rather than the Shiny version of validate(). That seems a strange feature for Shiny to import a package that features a naming conflict with a core function. The only solution I've found is to specify the package name after time I call validate (which is a large number of times) as discussed at the link below. Are there other options?

Are you sure you don't have your own library import for jsonlite ? I tested a new shiny with only importing shiny 1.8.0 and there is only one validate in the search path.

If I simply library(jsonlite) this changes, and results in what you describe, but not without so doing...

You can address this issue, in different ways.
one way, is loading jsonlite first so that shiny validate dominates, but then be careful when working on and jsonlite related work as you would need to namespace validate at that time.

another option is the conflicted passage.

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.