CraftSim

CraftSim

2M Downloads

Forgefinder JSON export malformed

mr120 opened this issue ยท 0 comments

commented

Seems there is an issue generating some of the json forgefinder exports

It looks like sometimes when a data field is not present, a comma is left in before a closing bracket

You can see below the last 3 recipes, difficulty is the last field, and ends with a comma, which is invalid json.
I'll try to find time to learn lua better and help out on my fix requests in future! ๐Ÿ™‚

 
 {
  "itemIDs": [
   212305,
   212306,
   212307
  ],
  "reagents": {
    "211807": 4,
    "210804": 5,
    "210806": 5,
    "213613": 1,
    "210799": 5,
    "211806": 4,
    "211808": 4,
    "210805": 5,
    "210807": 5,
    "210803": 5,
    "210801": 5,
    "210800": 5,
    "210802": 5   
},
  "skill": 121,
  "difficulty": 760,
  "multicraft": 0.070366,
  "resourcefulness": 0.02109
 },
 {
  "itemIDs": [
   223886,
   223886,
   223886
  ],
  "reagents": {
    "211803": 6,
    "211804": 3   
},
  "skill": 210,
  "difficulty": 650,

 },
 {
  "itemIDs": [
   223887,
   223887,
   223887
  ],
  "reagents": {
    "211802": 6,
    "211804": 3   
},
  "skill": 211,
  "difficulty": 650,

 },
 {
  "itemIDs": [
   223884,
   223884,
   223884
  ],
  "reagents": {
    "211804": 9   
},
  "skill": 205,
  "difficulty": 650,

 }
]```