I'd like to generate a JSON request. However, there are a TON of variations on the parameters that could be easily written using the builder pattern. However, I cannot figure out for the life of me a good way to do it.
I'm currently using the jsonlite
package to generate my JSON requests. It handily converts lists into JSON. I was thinking that one way to do this would be to return a partially configured list for each function call, but this doesn't really allow the chaining that makes the builder pattern so useful.
Is there a good way to handle this? I'm pretty new to working with R as more than just a statistical language so I'd really appreciate an experienced person helping me.
Thank you!
Aucun commentaire:
Enregistrer un commentaire