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
Extra characters in written file #44
Comments
Remove the |
Thanks JP. That does allow me to create some files but only complete objects. However, the JSON I am generating appears to be too big and kills writeFileSync(). Or maybe there is another issue I am not yet aware of. I can format the JSON in a text editor so I think it is ok. Here is the error: Would you consider adding a flag so that we can use it to write text? That way I can build the JSON bit-by-bit. I suppose others might want to use if for text files too? Thanks again JP |
What do you mean by "complete objects"? Do your objects contain a large amount of data? Are you trying to write out multiple objects, one per line? |
I am building the objects from metadata and data that I am getting from other sources. So, this string is the start of a large object that I want to generate but is not yet complete: |
If you're writing large amounts of data, |
Hello JP. Thanks for providing you jsonfile package.
I have been trying to use your jsonfile package and I am having an interesting problem.
This code:
jsonfile.writeFileSync('/tmp/gregg.dat', '{ "type":"configuration/entityTypes/HCP", \n"attributes": {\n');
Writes this:
"{ \"type\":\"configuration/entityTypes/HCP\", \n\"attributes\": {\n”
instead of:
{ "type":"configuration/entityTypes/HCP”, “attributes”: {
Am I doing something wrong?
The text was updated successfully, but these errors were encountered: