inky icon indicating copy to clipboard operation
inky copied to clipboard

Invalid exported JSON

Open falnos24865 opened this issue 6 years ago • 2 comments

JSON is not allowed to have the actual Tab character. It needs to be escaped as "\t". I found this by taking the "The Intercept" sample game, exporting to JSON, and trying to validate the output. This needs to be corrected before the exported output can be used my most sources, including node.js.

falnos24865 avatar Jan 05 '19 03:01 falnos24865

Specifically, the problem is with trailing tab characters after choices. For example in The Intercept there's this code (and some others that are similar) on line 231:

* * * 	[Yes] 			
	"{ forceful > 0:He's petty enough, certainly|I wouldn't put it past him}. He's a creep."

There are 3 tab characters after [Yes] which are exported to the JSON file as is. Tab characters in other places don't seem to cause any problem.

juhana avatar May 05 '19 10:05 juhana

I've tried to recreate this with Inky 0.12.0 and I believe it's fixed. I see a "\t\t\t" in the JSON and it ran successfully through a JSON validator.

lunarcloud avatar Jan 12 '22 18:01 lunarcloud