Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request "Write JSON/GEOJSON file into a memory buffer" #48

Open
apalacio9502 opened this issue Jun 8, 2024 · 2 comments
Open

Comments

@apalacio9502
Copy link

Hi @coolbutuseless,

I think it would be interesting to have an implementation of write_json_file and write_geojson_file in a memory buffer, which returns the raw vector of the JSON/GEOJSON file to avoid writing to disk in cases where the goal is to get the raw data from the file.

Regards,

@coolbutuseless
Copy link
Owner

So I can understand your issue better, could you give a mocked worked example of what you want to do?

@apalacio9502
Copy link
Author

apalacio9502 commented Jun 25, 2024

Hi @coolbutuseless ,

Apologies for the delayed response. In general, this functionality would be interesting for data transmission processes in raw format. I believe it would have significant potential in libraries like bigrquery, plumber, etc.

As an example, currently, when you want to obtain the raw data from a JSON using yyjsonr, you have to first write the JSON file and then read the raw data. However, this is inefficient because it involves using disk storage.

The idea would be to introduce a parameter similar to what was implemented in nanoparquet r-lib/nanoparquet#31, or a new function, allowing direct access to raw data without the need for intermediate disk storage.

Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants