Freelancer: ZaneDavid
Share:
Report Entry

JSON un-scrambler

It scans your Downloads Directory (or a custom directory) for the most recent file that ends in .json (assumingly your game replay) and cleans it, parses it, and spits it out into a .csv file that does what you asked Included is a code snippet, a screenshot of the csv file.

Contest Entry #8 for                                                 Extract Website and Json File Data to Create Simple Json File and Python Script to Automate Extraction of Similar Json Files

Public Clarification Board

  • algrim2011
    Contest Holder
    • 4 months ago

    Ok let me know

    • 4 months ago
  • algrim2011
    Contest Holder
    • 4 months ago

    I like it. If you can try putting it in json format. the python script should take the input and generate the new json.

    • 4 months ago
    1. ZaneDavid
      ZaneDavid
      • 4 months ago

      I have adjusted it so you can choose between .csv output or .json output. JSON is default

      • 4 months ago
  • ZaneDavid
    ZaneDavid
    • 4 months ago

    Oh shoot, I read your post wrong!

    Give me a few and I will re-arrange the data, thankfully the way I built it it already serializes it to json and then decodes it to the csv in line.

    It should be be done pretty quick!

    • 4 months ago
  • algrim2011
    Contest Holder
    • 4 months ago

    hello I like it
    I would like a representation json format if possible. Something like this.

    • 4 months ago
    1. algrim2011
      Contest Holder
      • 4 months ago

      Something like this which is just a simple representation of the sequence data.
      "replay": [
      {
      "replay_id": 1,
      "turn": 0,
      "game_type": "1v1",
      "steps": [
      {
      "player" : "Biglex"
      "action":"startTurn"
      "fra
      },
      "player" : "Biglex"
      "unit_id": 12343,
      "faction_id":5,
      "position": "-1;-4",
      "characterType": "Knight",
      "action":"move"
      ]
      }
      ]

      • 4 months ago

Show more comments Processing...