Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Questions about sheet.json

1421569884

Edited 1421570236
neovatar
Sheet Author
On the first release of my 13th Age chracter sheet, I had an error in my sheet.json value string for the key "instructions". I want to put some information (like changlog or caveats) there. I also want to use line breaks and markdown formatting. The file I had seemed correct and passed a jsonlint. But the sheet was gone not publicly visible after a roll20 update. I was told, it would not deploy because errors in its sheet.json. - Is there a another way to check if sheet.json will work with roll20? Possibly see the end result? - How can I pass linebreaks to the "Instructions" string (e.g. "\r")? - What markdown and characters are safe to use? Thanks, and sorry, if this is a FAQ!
1421574858
Finderski
Pro
Sheet Author
Compendium Curator
neovatar - I always struggle with the json files myself. The problem to watch out for would be tab characters instead of spaces (that's usually what gets me). Here are three websites I was given to help validate the json file: <a href="http://www.freeformatter.com/json-formatter.html" rel="nofollow">http://www.freeformatter.com/json-formatter.html</a> <a href="http://jsonformatter.curiousconcept.com" rel="nofollow">http://jsonformatter.curiousconcept.com</a> <a href="http://jsonlint.com" rel="nofollow">http://jsonlint.com</a> For line breaks, \r is correct. As for the markdown, I believe the standard markdown conventions work. The Pathfinder sheet is the one I used for my model. It can be seen at: <a href="https://github.com/finderski/roll20-character-shee" rel="nofollow">https://github.com/finderski/roll20-character-shee</a>... Hope this helps, and good luck.
1421588618

Edited 1421588753
Lithl
Pro
Sheet Author
API Scripter
\n is the line feed character. \r is carriage return. Some systems handle a carriage return on its own as a newline, while most will treat a line feed on its own as a newline. Strictly speaking, \r should return to the start of the line (without advancing to the next line) while \n advances to the next line (without returning to the start of the line), which is why Windows writes \r\n to files with newlines in them. The (intended) behavior of these two characters is based on typewriters, where moving to the left side of the page (sliding the carriage right) is a separate action from advancing further down the page (rotating the carriage). I'm sure there are some typewriters which combined these two actions into one lever press or something, but yay historical trivia! =) I can't speak to how Roll20 handles solitary carriage returns in the sheet.json, but I know for a fact that solitary line feeds will be treated as newlines. The only Markdown I have experienced not working is images: ![alt text](image url)
1421597872

Edited 1421614674
neovatar
Sheet Author
Thanks for the hints! I still would value "official" dev input, since I had a valid json (according to jsonlint) that proved Roll20 incompatible later. @Brian: I was wondering, because I saw people using just "\r" in some sheet.json (e.g. Pathfinder sheet). Using Linux I'd rather use a "\n". I just checked again and found some "\n" sheets. Ah, what the heck I'll might as well just try -- pull request is out ;)