open5e-api icon indicating copy to clipboard operation
open5e-api copied to clipboard

Recurring random unicode characters in .json files.

Open augustjohnson opened this issue 1 year ago • 0 comments

Our json files occasionally get edited by stuff like pythons open() which sometimes results in weird character stuff.

Example of errant unicode showing up unwanted. https://github.com/open5e/open5e-api/pull/185/commits/6118e17e26ce3954d7ca4aaa661299738d4f396d

This is sometimes invisible to people editing the files (because of their editors and stuff).

Potential solutions:

  • Tests (literally pytest tests) that check the files for a set of commonly messed up characters and fail if they show up.
  • Pre-commit checks for unicode or something, I'm not sure exactly the specific scenario.
  • Documentation on how to interact with the json files using python files plus maybe some examples?

augustjohnson avatar May 19 '23 22:05 augustjohnson