itinance / itinance/react-native-fs
Extra bracket when saving a JSON file
- Dominant language
- C++
- Stars
- 5k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Description
In my app, I save a JSON file, and somewhere I load it back.
But when I try to load it back, the parsing process fails:
The saved JSON file as an extra bracket at the end.
### 🎨 📸
Here is a screenshot

So I saved the file in [`RNFS.DownloadDirectoryPath`](https://github.com/itinance/react-native-fs/blob/a67a8d7cc7b51fc7892cf5a345c62efe22054fde/FS.common.js#L623) so I can check it myself from a File Explorer, and yeah, the file on the disk really has an extra bracket. The JSON is invalid.
### 🤔 😫
What's could be the problem? Can someone help?
Versions:
```json
"react": "16.9.0",
"react-native": "0.61.5",
"react-native-fs": "^2.16.6",
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.