Thread Tools Display Modes
Prev Previous Post   Next Post Next
10/07/19, 02:07 PM   #1
Enodoc
AddOn Author - Click to view addons
Join Date: Aug 2014
Posts: 52
JSON to Lua

Anyone have any ideas how to convert a JSON script to a Lua table so it can be read by add-ons?

Here's an example of the JSON:
Code:
{"numRecords":1,"quest":[{"id":"2345","logId":"144998164","locationId":"20246462","name":"Depths of Madness","level":"50","type":"0","repeatType":"0","displayType":"0","backgroundText":"I found a lost member of the Queen's entourage near the entrance to a hidden Vale. She told me that her fellow entourage members have been taken. A mad mage apparently holds them in the Vale.","objective":"Glister Vale","poiIndex":"4","goalText":"Talk to Eminelya","confirmText":"","declineText":"","endDialogText":"Sanessalmo? Now that name I remember. Used to be a member of the Queen's inner circle! \n\nYou have my deepest gratitude for your service today. I'll be sure the Queen learns of your bravery.","endBackgroundText":"I found a lost member of the Queen's entourage near the entrance to a hidden Vale. She told me that her fellow entourage members have been taken. A mad mage apparently holds them in the Vale.","endJournalText":"I returned to Eminelya's side. I should speak to her one last time.","isShareable":"1","numTools":"1","hasTimer":"0","timerCaption":"Depths of Madness","timerDuration":"0","numSteps":"1","numRewards":"-1","count":"19","zone":"Auridon","internalId":"4272"}]}
If that could be turned into a Lua table array, basically syntactically replacing {"":""} with {[""]=""}, then the data could be incorporated in an add-on (or even a Lib for others to use).

Thanks!
  Reply With Quote
 

ESOUI » Developer Discussions » Lua/XML Help » JSON to Lua


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off