I am sending a http request where the body needs to be in json format. As standard it seems that value null is being quoted. This prevents the http request to work properly. When testing to build a string manually and removing the quotes for value null, then the http request works fine.
Question:
Can jsonlite handle to strip off the quotes from all null values?
My current code:
library(jsonlite)
x <- list(epic = "Stockholm", currency = "null")
json <- toJSON(x, auto_unbox = TRUE)
Gives result, that does not work:
{"epic":"Stockholm","currency":"null"}
This manually constructed string works:
{"epic":"Stockholm","currency": null}