Author Topic: --list-components-json needs to escape quotes and possibly other strings  (Read 892 times)

Offline AL|EN

  • Planewalker
  • *****
  • Posts: 391
  • Gender: Male
Hi,
initial testing of the --list-components-json shows that if there is a quote character inside mod component description:

Code: [Select]
[{"index":0,"number":0,"forced":false,"name":"The BG1 NPC Project: Required Modifications","group":[]},{"index":1,"number":1,"forced":false,"name":"The BG1 NPC Project: Banters, Quests, and Interjections","group":["The BG1 NPC Project: Banters, Quests, and Interjections"]},{"index":2,"number":2,"forced":false,"name":"The BG1 NPC Project: Give Edwin his BG2 portrait","group":["The BG1 NPC Project: Portrait Changes and Additions"]},{"index":3,"number":3,"forced":false,"name":"The BG1 NPC Project: Give Imoen her BG2 portrait","group":["The BG1 NPC Project: Portrait Changes and Additions"]},{"index":4,"number":4,"forced":false,"name":"The BG1 NPC Project: Give Jaheira her BG2 portrait","group":["The BG1 NPC Project: Portrait Changes and Additions"]},{"index":5,"number":5,"forced":false,"name":"The BG1 NPC Project: Give Minsc his BG2 portrait","group":["The BG1 NPC Project: Portrait Changes and Additions"]},{"index":6,"number":6,"forced":false,"name":"The BG1 NPC Project: Give Viconia her BG2 portrait","group":["The BG1 NPC Project: Portrait Changes and Additions"]},

{"index":7,"number":7,"forced":false,"name":"The BG1 NPC Project: Kivan's "Kivan and Deheriana Companions" portrait","group":["The BG1 NPC Project: Portrait Changes and Additions"]},

{"index":8,"number":8,"forced":false,"name":"The BG1 NPC Project: Add Non-Joinable NPC portraits to quests and dialogues","group":["The BG1 NPC Project: Portrait Changes and Additions"]},{"index":9,"number":9,"forced":false,"name":"The BG1 NPC Project: Ajantis Romance Core (teen content)","group":["The BG1 NPC Project: Romances"]},{"index":10,"number":10,"forced":false,"name":"The BG1 NPC Project: Branwen's Romance Core (teen content)","group":["The BG1 NPC Project: Romances"]},{"index":11,"number":11,"forced":false,"name":"The BG1 NPC Project: Coran's Romance Core (adult content)","group":["The BG1 NPC Project: Romances"]},{"index":12,"number":12,"forced":false,"name":"The BG1 NPC Project: Dynaheir's Romance Core (teen content)","group":["The BG1 NPC Project: Romances"]},{"index":13,"number":13,"forced":false,"name":"The BG1 NPC Project: Shar-Teel Relationship Core (adult content)","group":["The BG1 NPC Project: Romances"]},{"index":14,"number":14,"forced":false,"name":"The BG1 NPC Project: Xan's Romance Core (teen content)","group":["The BG1 NPC Project: Romances"]},{"index":15,"number":15,"forced":false,"name":"The BG1 NPC Project: Female Romance Challenges, Ajantis vs Xan vs Coran","group":["The BG1 NPC Project: Romances"]},{"index":16,"number":16,"forced":false,"name":"The BG1 NPC Project: NPCs can be sent to wait in an inn","group":["The BG1 NPC Project: Tweaks"]},{"index":17,"number":17,"forced":false,"name":"Alora Starts in the Hall of Wonders","subgroup":"The BG1 NPC Project: Alora's Starting Location","group":["The BG1 NPC Project: Tweaks"]},{"index":18,"number":18,"forced":false,"name":"Alora Starts in Gullykin","subgroup":"The BG1 NPC Project: Alora's Starting Location","group":["The BG1 NPC Project: Tweaks"]},{"index":19,"number":19,"forced":false,"name":"Eldoth Starts in the Cloakwood Forest","subgroup":"The BG1 NPC Project: Eldoth's Starting Location","group":["The BG1 NPC Project: Tweaks"]},{"index":20,"number":20,"forced":false,"name":"Eldoth Starts on the Coast Way","subgroup":"The BG1 NPC Project: Eldoth's Starting Location","group":["The BG1 NPC Project: Tweaks"]},{"index":21,"number":21,"forced":false,"name":"Quayle Starts at the Wyrm's Crossing","subgroup":"The BG1 NPC Project: Quayle's Starting Location","group":["The BG1 NPC Project: Tweaks"]},{"index":22,"number":22,"forced":false,"name":"Quayle Starts at the Nashkel Carnival","subgroup":"The BG1 NPC Project: Quayle's Starting Location","group":["The BG1 NPC Project: Tweaks"]},{"index":23,"number":23,"forced":false,"name":"Tiax Starts in Baldur's Gate","subgroup":"The BG1 NPC Project: Tiax's Starting Location","group":["The BG1 NPC Project: Tweaks"]},{"index":24,"number":24,"forced":false,"name":"Tiax Starts in Beregost","subgroup":"The BG1 NPC Project: Tiax's Starting Location","group":["The BG1 NPC Project: Tweaks"]},{"index":25,"number":25,"forced":false,"name":"Jason Compton's Accelerated Banter Script","group":["The BG1 NPC Project: Tweaks"]},{"index":26,"number":26,"forced":false,"name":"BGEE Banter Timing Tweak","group":["The BG1 NPC Project: Tweaks"]},{"index":27,"number":27,"forced":false,"name":"The BG1 NPC Project: Make Shar-Teel Unkillable Until In Party","group":["The BG1 NPC Project: Tweaks"]},{"index":28,"number":28,"forced":false,"name":"The BG1 NPC Project: Bardic Reputation Adjustment","group":["The BG1 NPC Project: Tweaks"]},{"index":29,"number":29,"forced":false,"name":"Open Cloakwood Lodge (first Cloakwood area only)","subgroup":"The BG1 NPC Project: Cloakwood areas availability in Chapter One","group":["The BG1 NPC Project: Tweaks"]},{"index":30,"number":30,"forced":false,"name":"Open four Cloakwood areas (everything but the Mines)","subgroup":"The BG1 NPC Project: Cloakwood areas availability in Chapter One","group":["The BG1 NPC Project: Tweaks"]},{"index":31,"number":31,"forced":false,"name":"SixofSpades Extended Sarevok's Diary","subgroup":"The BG1 NPC Project: Sarevok's Diary Adjustments","group":["The BG1 NPC Project: Tweaks"]},{"index":32,"number":32,"forced":false,"name":"Sarevok's Diary Date Changes only","subgroup":"The BG1 NPC Project: Sarevok's Diary Adjustments","group":["The BG1 NPC Project: Tweaks"]},{"index":33,"number":33,"forced":false,"name":"The BG1 NPC Project: Check for TutuFix Walking Speeds","group":["The BG1 NPC Project: Tweaks"]},{"index":34,"number":200,"forced":false,"name":"The BG1 NPC Project: Player-Initiated Dialogues","group":[]}]
correct:
Code: [Select]
{"index":7,"number":7,"forced":false,"name":"The BG1 NPC Project: Kivan's \"Kivan and Deheriana Companions\" portrait","group":["The BG1 NPC Project: Portrait Changes and Additions"]},without escaping, importing such JSON fails.
« Last Edit: March 15, 2017, 12:57:58 PM by AL|EN »
Project Infinity public BETA - mod manager for Infinity Engine games
Modder's Guide to Github - you cannot have progress without committing changes

Offline Wisp

  • Moderator
  • Planewalker
  • *****
  • Posts: 1176
Backslash, too.

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: