Show JSON's parsing error message

AnkiWeb addon 2061352905

Displays JSON parse error messages for add-on configuration files, helping users debug and correct invalid hand-written JSON, and prints the previous config to prevent data loss.
AI-generated summary; may contain mistakes.

backup-maintenancebugfix-workarounddeveloper-tools

Open on AnkiWeb GitHub Find alternatives

AnkiWeb

Votes
1 (👍 1 · 👎 0)
Updated
2018-11-21
Anki versions
unknown
License
GPL-3.0 (from the GitHub repository)
Virus scan
No ClamAV match A match does not prove malware. No match does not prove that the code is safe.
Languages
Python, Batchfile
Description language
en

Maintenance

abandoned

  • Last update or commit: 2020-08-02 (2282 days before the snapshot).
  • Commits in the last year: 0.
  • Issues: 0 open, 0 closed.
  • Pull requests: 0 open, 0 merged.

Will it work on my Anki?

Version branches
Min AnkiMax AnkiUpdated
2.1.0–2018-11-21
History across monthly snapshots

Loading…

Similar addons

anki_ruby_support

Adds customizable ruby annotations (furigana/pinyin) to selected card text via toolbar button or shortcut key, with adjustable font size, text color, and error logging.

formattingshortcuts

1 votes 21% approval 👍 1 · 👎 0 Anki 2.1.1~ Updated 2025-01-14
Sound On Tag

Plays configurable sounds during card reviews when cards have specified tags, with tag-to-sound mappings editable in config.json.

review-flowtagging

3 votes 44% approval 👍 3 · 👎 0 Anki 2.1.46~ Updated 2021-08-14

Description

Ensure that you see JSON's error. It allows to debug configuration file.

README

Show JSON error message when importing

Rationale

For some reason, anki use json for config. If json is not parseable, (which is often, since it may be hand-written), it generates an error-message. And Anki choose to hide it, considering instead that the config is empty !

Usage

This add-on correct this problem by showing json's error message, allowing the user to correct their JSON. It also print the past config, so if you add-on destroy it, it is not lost.

Internal

This add-on change AddonManager.addonMeta and AddonManager.addonConfigDefaults in module aqt.addons. It does not call the last version, and thus is incompatible with any other add-ons modifying this.

Links, licence and credits

Key Value
Copyright Arthur Milchior arthur@milchior.fr
Based on Anki code by Damien Elmes anki@ichi2.net
License GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
Source in https://github.com/Arthur-Milchior/anki-debug-json
Addon number 2061352905