electron-userland / electron-json-storage

:package: Easily write and read user settings in Electron apps
1.43k stars 79 forks source link

Option to store real json #90

Closed achtan closed 6 years ago

achtan commented 6 years ago

is there a way to store real JSON format?

why are you using JSON.stringify anyway? I assumed when the package name is electron-json-storage that it will store real json files... even the file extension name is '.json' but the content is in string :/

jviotti commented 6 years ago

JSON is a text-based format. Real JSON is the output of JSON.stringify. I think you're getting confused with JavaScript Objects, from where JSON originated. Every JSON string can be parsed as a JavaScript Object, but not every JavaScript Object can be stringified into JSON.