-
-
Notifications
You must be signed in to change notification settings - Fork 425
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
bookmark list
output is not a valid JSON
#150
Comments
hmmm, the output of |
bookmark list
output is not a valid JSON
I think both keys and string values should be in double quotes. Other JSON issues I noticed:
Example output:
|
fixed the encoding issue by using json.stringify to get parsable JSON
I had a look at the issue and the problem is, that console.dir does not perform a proper encoding, so I switched it to JSON.stringify with 4 space indentation to have the same formatting. The overall issue is another one though:
There is also a feature request (#43) to get a REST API. Maybe it makes sense to adapt the CLI with #43 to have a "--json" option as well, that will just return the JSON (for all commands) and respond with a more user friendly table if you don't specify "--json"? |
Reworked the cli to switch over to json output
Reworked the cli to switch over to json output
With the CLI,
hoarder bookmarks list > bookmarks.json
kinda works, but it outputs malformed/invalid JSON.The text was updated successfully, but these errors were encountered: