pc2ccs / pc2v9

Version 9 of the PC^2 Programming Contest Control System
Eclipse Public License 2.0
46 stars 23 forks source link

Scoreboard JSON should all use the same SA (use NSA) #534

Open lane55 opened 2 years ago

lane55 commented 2 years ago

Is your feature request related to a problem?

There should be a single class to generate Scoreboard JSON.

*Feature Description**:

CI change. There are DSA and NSA algorithms used, the DSA should not be used.

class ScoreboardJson uses DSA class StandingsJSON2016 uses NSA class ContestAPIStandingsJSON uses NSA in method createJSON

Good news is that the DSA xml is typically converted to JSON using the ScoreboardUtilites.createContestStandings so it is the SA that shoudl be changed.

Have you considered other ways to accomplish the same thing?

Do you have any specific suggestions for how your feature would be **implemented in PC^2?**

Additional context:

johnbrvc commented 2 years ago

The JSON format has also changed. As per Tim Deboer, "...[A new parent item was added] in with some “header” attributes and moving the object you have now into a “rows” child object." As per: https://ccs-specs.icpc.io/2022-07/contest_api#scoreboard The current JSON format is evidently from the very first CLICS API before 2019. TIm also said he "looked at the code and I think the CDS will handle the old or new formats, so it’s probably fine for now. "

lane55 commented 2 years ago

The JSON format has also changed. As per Tim Deboer, "...[A new parent item was added] in with some “header” attributes and moving the object you have now into a “rows” child object." As per: https://ccs-specs.icpc.io/2022-07/contest_api#scoreboard The current JSON format is evidently from the very first CLICS API before 2019. TIm also said he "looked at the code and I think the CDS will handle the old or new formats, so it’s probably fine for now. "

This comment is not related to which SA is used. All current scoreboard JSON are created using multiple NSA and DSA createJSON, for example ScoreboardJsonUtility.createScoreboardJSON and ContestAPIStandingsJSON.createJSON and and StandingsJSON.createJSON