Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: misplaced field name error on mutation tileset #3345

Merged

Conversation

scarf005
Copy link
Member

@scarf005 scarf005 commented Oct 2, 2023

Summary

SUMMARY: Bugfixes "Strict JSON warnings when loading new mutation tileset"

Purpose of change

 DEBUG    : (json-error)
Json error: <unknown source file>:2:10: Invalid or misplaced field name "type" in JSON data

{
  "type":
         ^
          "mod_tileset",
  "compatibility": [
    "UNDEAD_PEOPLE_BASE",


 FUNCTION : void JsonObject::report_unvisited() const
 FILE     : /home/scarf/repo/cata/Cataclysm/src/json.cpp
 LINE     : 125
 VERSION  : BN 8b4336bb134b

hotfix for #3340.
for some reason object format errors wheras array format doesn't

Describe the solution

wrap it in array

Describe alternatives you've considered

make the behavior same for objects...

Testing

loaded without errors.

for some reason object format errors wheras array format doesn't
@scarf005 scarf005 requested a review from chaosvolt October 2, 2023 07:50
@github-actions github-actions bot added the JSON related to game datas in JSON format. label Oct 2, 2023
@chaosvolt chaosvolt added this pull request to the merge queue Oct 2, 2023
Merged via the queue into cataclysmbnteam:upload with commit dd4963d Oct 2, 2023
@scarf005 scarf005 deleted the fix-invalid-json-warning branch October 2, 2023 09:46
olanti-p pushed a commit to olanti-p/Cataclysm-BN that referenced this pull request Oct 6, 2023
for some reason object format errors wheras array format doesn't
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
JSON related to game datas in JSON format.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants