-
Notifications
You must be signed in to change notification settings - Fork 99
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
Serialization & Deserialization #25
Comments
Hi Kai, The function serialize.toString does not automatically generate a json file. It only returns a string. To save the string to a file, you can use the standard writeFile or writeFileSync function of the fs library, see here: For example:
|
You're so cool! Let's say I had saved the string to "myFileName.json" as suggested... My guess:
Am I right? Thanks again! |
In order to deserialize, you first have to read the string from the file, like this:
|
Working great! |
@erelsgl Can we deserialise the external .json (http://anotherweb.com/json/myFileName.json) ? My guess: var __dirname = "http://anotherweb.com/json"; Can you confirm that? |
Hi Kai, I think readFileSync works only with local files. To download a remote file, try the suggestions here: On Mon, Apr 27, 2015 at 5:29 PM, Kai Chew notifications@github.com wrote:
|
@erelsgl |
I'm having issues with the Serialisation and Deserialisation for combination of limdu + serialization npm packages.
Normally, we will serialise into a .json file.
Using serialize.toString(), I don't where is the serialized .json file.
Q1. Maybe limdu/serialization will not generate the .json file?
Anyone can enlighten?
Thanks.
The text was updated successfully, but these errors were encountered: