farling42 / obsidian-import-json

Plug-in for Obsidian.md which will create Notes from JSON files
MIT License
85 stars 5 forks source link

Valid json with curly braces can cause import to fail #51

Closed nathonius closed 11 months ago

nathonius commented 12 months ago

Valid json that includes a string like } { causes the import to fail. The splitting code here that attempts to process multiple json objects in a single file is the source of the issue.

Instead it might be best to check if the top level of the file is an array, or at least have an option to enable/disable this behavior.

farling42 commented 11 months ago

Version 0.31.1 now makes it an option to treat the JSON file as having multiple records, rather than automatically assuming so.