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

Changes to JSON data for consistency #324

Merged
merged 8 commits into from
Jan 25, 2021
Merged

Changes to JSON data for consistency #324

merged 8 commits into from
Jan 25, 2021

Conversation

olanti-p
Copy link
Contributor

Purpose of change

Make JSON data more consistent.

Describe the solution

  1. Convert all lone top level objects to arrays with single element (makes it easier to work with the data; see CleverRaven#41498 )
  2. Stop supporting duplicate json comments ( see CleverRaven#40390 )
  3. Use id instead of ident for identifier member names (see CleverRaven#39332 )
  4. Some doc updates (CleverRaven#42577)

Code related commits were cherry-picked, the rest is automatic refactoring.

Describe alternatives you've considered

Remove support for ident and lone top level objects right here right now, but I'm pretty sure modders wouldn't like that.

Testing

Tests pass, the game loads a save.

Additional context

In case someone will need them: py-scripts.tar.gz

ZhilkinSerg and others added 8 commits January 17, 2021 21:45
Leave temporary support for `ident`. Marked with:

// TEMPORARY until 0.G: Remove "ident" support
Previously we whitelisted "//" and "comment" as keys which were allowed
to be duplicated in json objects.  Stop doing that.

Allowing these duplicate keys only causes problems when attempting to
process the game data files using other json tools or libraries.
@Coolthulhu Coolthulhu merged commit 14ed38f into cataclysmbnteam:upload Jan 25, 2021
@olanti-p olanti-p deleted the ident-id-migration branch January 25, 2021 20:43
chaosvolt added a commit to chaosvolt/cdda-arcana-mod that referenced this pull request Feb 22, 2021
Now that id is valid for these JSON types thanks to
cataclysmbnteam/Cataclysm-BN#324 that allows me
to update the BN version of Arcana accordingly. Other mod updates to
follow.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants