[Bug]: Numeric character weight value breaks import of Alchemy-formatted JSON #53
Closed
1 task done
Labels
bug
Something isn't working
What happened?
When attempting to directly import the below character, Alchemy would throw an error and refuse to import the character. I had a look at the manual route and found that the JSON converts just fine, but when trying to import the Alchemy-formatted JSON into Alchemy itself, it would throw an error because I had a numeric value in the character weight field, and Alchemy is expecting a string.
Manually editing the JSON to ensure the weight is wrapped in quotes to force it to a string fixed the issue, so I imagine that the same treatment is needed in the converter itself to ensure that this doesn't happen. If we make sure that we caste any value imported here as a string (
String(value)
) then that should catch situations where there is a number type in the field.D&D Beyond Character Link
https://www.dndbeyond.com/characters/7988555/5uCKLU
Alchemy Version
0.213.0 (efd506d7a1)
Alchemy User Agent
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Alchemy/1.2.0 Chrome/112.0.5615.50 Electron/24.1.1 Safari/537.36
Code of Conduct
The text was updated successfully, but these errors were encountered: