fabric.mod.json bad formatting
rtm516 opened this issue ยท 1 comments
Describe the bug
Due to the \n
at the start of the contributors
section in the fabric.mod.json
the file produced has a new line in the middle of a string therefor is out of JSON specification and wont parse on many JSON parsers/validators
To Reproduce
Paste the `` from the compiled jar into a JSON validator (EG: https://jsonlint.com/)
Expected behavior
The file follows specification and validates
Screenshots
Snippet of the compiled json
{
"contributors": [
"
The track C418 - Dog is property of Daniel Rosenfeld (C418) please do not redistribute this song. If you like it please buy it on bandcamp https://c418.bandcamp.com"
],
}
Environment
- OS: N/A
- Java Version: N/A
- Minecraft Version: 1.20.1
- Fabric/Quilt Version: N/A
- Fabric API/QFAPI+QSL Version: N/A
- Mod Version: 0.7.3
This is intended as the mod "Mod Menu" parses the newline character and creates a new line. I did this since it looks better ingame. \n is a valid character in JSON specification as it is essential for formatting text within a string. The JSON validators which are erroring are poorly made and parsing it as an actual new line instead of part of the string that it is contained in.