Open-EO / openeo-r-client

R client package for working with openEO backends
https://open-eo.github.io/openeo-r-client
Apache License 2.0
61 stars 17 forks source link

add processToJSON for convenience #114

Closed m-mohr closed 2 years ago

m-mohr commented 2 years ago

For context see https://github.com/Open-EO/openeo.org/pull/56

flahn commented 2 years ago

I am not sure if we need this. Printing a process to console should already give you a JSON. If you want it printed to a file, I would suggest to overload as.list(x) somehow, where you handle the serialization. Depending on the json package the user has installed, they can use it as they like. Probably all json packages know how to deal with lists.

m-mohr commented 2 years ago

Open for alternatives, but it seems to be an issue though as you can see in the PR. 3 persons had a hard time figuring out how to solve the issue, it took me like 20mins to figure out what to use so help is needed in some shape or form.

flahn commented 2 years ago

updated/merged the PR, processToJSON is now also available, but will be immediately marked as deprecated - as is graphToJSON. Use for this purpose openeos toJSON function (implemented for objects Process and Graph)