Json's, Classes, and Strings


Introduction

This fortnight I spent my time trying to work on converting JSON files into a class. I spent most of the time doing research and have made some headway but haven't refined the project just yet.

Goals

  • Convert a JSON to a usable CS file.
  • Use the information stored in the CS file to create an object or weapon.

Personnel

Primary – Ryley Delaney

Secondary – Jed May, Zack Camille

Technologies, Tools, and Resources used

Provide resource information for team members who wish to learn additional information from this spike.

      Writing to files in c#/unity:

What we found out

When writing to a CS file, the file still needs to be formatted in such a way to accommodate the syntax of C#. Therefore if a file is changed between formats, then the syntax will no longer work. This makes the process much more difficult however I have atleast managed to load the data from the JSON to a c# file. I'm now looking at ways to format the file based on each class with the line "ID" and create a seperate Weapon class based off those. This means using for loops.

Leave a comment

Log in with itch.io to leave a comment.