Skip to main content

Questions tagged [json]

JSON (JavaScript Object Notation) is a lightweight human-readable data interchange format. It is programming language-independent and many modern programming languages include code to generate and parse JSON-format data. JSON filenames use the extension `.json`.

Filter by
Sorted by
Tagged with
0 votes
1 answer
65 views

I've used FromJson in Unity/C# a dozen times, and yet for some reason I cannot figure out why this one's not working. Here's the code that does the parsing: ...
rpatton583's user avatar
0 votes
1 answer
120 views

I'm using JsonConvert.DeserializeObject to deserialize animals from the Animal list, but unfortunately they get deserialized as Animals instead of their derived classes (Cat and Dog). As you can see, ...
Manuel Saraiva's user avatar
0 votes
1 answer
173 views

I'm making a game in Unity and I'm using json format to save. I have no problem recording it on my computer, but it does not record the animals I catch on my Android phone. How can I solve this? What ...
Volkan AKDAG's user avatar
0 votes
0 answers
45 views

I'm making an Offline RPG game in Unity. I want to save some things in my game. I have heard of two recording systems for this, one is PlayerPrefs and the other is to save in json format. PlayerPrefs ...
Volkan AKDAG's user avatar
0 votes
1 answer
185 views

Task: to develop a function that efficiently places rectangular blocks in rectangular 2D container. The location of the blocks in the container should be as dense as possible in order to rationally ...
Назар Саханда's user avatar
3 votes
1 answer
866 views

I'm developing a RPG-game. After searching about various ways to save item information in RPG-game, I determined to save information in JSON files. The problem is that in my game, some equipment's ...
evol1102's user avatar
0 votes
0 answers
156 views

I am trying to open a project from a company, the problem is, nobody has this problem except me, so one can replicate it. When i open the project i get the following issues: There seems to be a file ...
Seyren Windsor's user avatar
1 vote
1 answer
1k views

I currently have a JSON file: ...
misaochan's user avatar
  • 185
0 votes
1 answer
2k views

I'm trying to create a script that parses a JSON file to get information about the levels in my project. I know this technique should work because I have the same code in two other scripts, parsing ...
rpatton583's user avatar
0 votes
1 answer
110 views

Now, I now the title is really obscure, but I have tried to solve the following problem for so long and most of it is integrated into my game so far that I can't just copy & paste it here, so this ...
DemonicTree's user avatar
2 votes
1 answer
788 views

I need to create a lot of read-only text data. As far as I know storing a lot of data directly in the script is not good, so I need to create a separate json file with ready-made data to load in the ...
Silz's user avatar
  • 37
0 votes
2 answers
1k views

I try to save game data in PlayerPrefs as JSON string. I read in documentation that I can use plain struct/class with ...
EzioMercer's user avatar
0 votes
0 answers
53 views

How do online games handle creation of new entities? I currently have an EntityFactory class that requires an ID (specifying the entity type). A bunch of subroutines are executed to determine exactly ...
Kaeru's user avatar
  • 3
1 vote
1 answer
3k views

I have a file which is created manually. In what folder should I put it so I can read it in a build? For example Application.dataPath in editor reads the file from ...
Ivan's user avatar
  • 379
1 vote
0 answers
1k views

I'm trying to serialize the state of play of my Unity game (Unity 2021.3.7f1) to JSON using UnityEngine.JsonUtility.ToJson, so that I can persist this state to disk ...
ChrisC's user avatar
  • 116
0 votes
2 answers
210 views

i'm new to unity and i want to do a quiz using data coming from a web api I was able to retreive data from the api but i couldn't make the game logic with them This is where i arrived ...
Jack Hail's user avatar
0 votes
1 answer
717 views

What I have JSON file ...
Arian_ki's user avatar
  • 691
0 votes
1 answer
684 views

I'm using a JSON file for loading texts and dialogs and here's my JSON file: ...
Arian_ki's user avatar
  • 691
0 votes
0 answers
351 views

Background: My app is a sandbox with a large number of parameters that I want to be able to easily add / selectively expose to the user, edit during runtime through the game UI or from the Unity ...
arcadeperfect's user avatar
1 vote
1 answer
809 views

I want my game-save to be shown with a preview image. This is often seen in City Builder games: The game-save usually has a name, a date and often also provides a preview of the build city (just a ...
Vivien Lynn's user avatar
0 votes
1 answer
66 views

I'm trying to make an RPG style game with equipment using ScriptableObject, but whenever I equip the item, it does not register in my JSON data. Here is the script ...
Dwiky Anderson's user avatar
0 votes
2 answers
1k views

I'm having difficulties serializing lists with the built in JsonUtility. I eventually figured out this just isn't possible with its limited capabilities. As much as I'd like to use Newtonsoft, I ...
Vandel212's user avatar
  • 135
-1 votes
1 answer
590 views

i was wondering if you could help me with an issue i have with firebase and databases! I have a class that saves variables into an array. i have managed to send that json file to firebase and i can ...
stratos la's user avatar
0 votes
0 answers
82 views

I want to integrate Firebase to my android/iOS game. So far in production I used JSON to save a class into the devices PersistentDataPath and load them accordingly. I did follow the firebase ...
stratos la's user avatar
0 votes
1 answer
226 views

I have been trying to work out a subscription form for my game and thanks to you guys here, I came to a solution which works but still needs some changes. The idea is to have an input field in the ...
stratos la's user avatar
0 votes
1 answer
2k views

I'm trying to parse a very large JSON string in Unity. I do not need all the fields and I can't create a class with all the members. It appears that all examples I have found, including the official ...
mneumann's user avatar
  • 103
0 votes
1 answer
2k views

**UPDATE: This answer has been solved and this post updated to ** I am creating an inventory system and decided to keep a master list of all the items. The goal is to use Newtonsoft's JSON.net to ...
Ian Rosenberg's user avatar
0 votes
0 answers
278 views

Greetings! I'm working on a class that loads and parses .json files and returns information from the loaded .json, but I have problems reading the nested arrays of my .json files. Turning the ...
BreakSilence's user avatar
0 votes
1 answer
142 views

I'm making an add-on that lets the player step over 1-block high blocks and the foot_size property is exactly what I'm looking for. The documentation says the following: "Sets the number of ...
icebird76's user avatar
  • 101
2 votes
1 answer
613 views

Any one have any ideas on how I can serialize / de-serialize an ObjectMap<Enum, ObjectMap<String, Object>>(); (Object is usually a String Integer ...
Macmanmatty's user avatar
2 votes
1 answer
2k views

i have the problem that when I convert an instance of highscores through JsonUtility.ToJson the value of my value of it is always {"highscoreEntryList":[{},{},{},{},{},{},{},{},{},{},{}]}... ...
Hypes's user avatar
  • 21
0 votes
0 answers
98 views

I'm getting a null reference exception on "AddEmpireView()" and I cannot figure it out for the life of me. Here's the class: ...
DauntlessRob's user avatar
1 vote
1 answer
1k views

The following is my JSON file: ...
AKA's user avatar
  • 111
0 votes
0 answers
84 views

Problem statement: Need help trying to load a JSON file into a table array in Lua for Corona SDK development. My Objective: Call specific data from JSON file to my application by using key value ...
Kinzoku Battu's user avatar
0 votes
0 answers
89 views

So, I'm trying to wrap my head around something. I've got my basic quest system up and running for my rpg style game. Right now I'm taking a look at NPC events and triggers that as I see it have two ...
user2350585's user avatar
0 votes
2 answers
1k views

I have a game where a player can place GameObjects. I can save/load this GameObjects data with using JSON, for example its position, but I cannot think of a good way to tell my save-file (and my ...
Green_qaue's user avatar
  • 1,933
0 votes
1 answer
2k views

I'm building an HTML game. For this game I want to implement a save-feature that should work like in some already existing games: The user can chose export, this ...
sininen's user avatar
  • 101
0 votes
1 answer
692 views

I'm saving game data into JSON, however basically I can't get property with just string just like in JavaScript. This makes my code to write so many if/switch statements, looks very not clean, hard ...
modernator's user avatar
  • 1,223
4 votes
2 answers
2k views

I'm currently creating an external tool to generate dialogues that are exported as JSON files. The idea is that after you create a dialogue (as a JSON), my main Unity project reads that file and ...
roseicollis's user avatar
1 vote
1 answer
419 views

i am trying to practice on loading data from json files my problem is about when i try to load the sprite path from the json file to load the image icon from the floder that contain it, i manged to do ...
Times's user avatar
  • 11
1 vote
1 answer
368 views

I am trying to save data about various entities in each Level in my game in a JSON file and load it at Runtime(Like a Scene file in Unity). I can save simple stuff like floats and ints and parse them ...
Vignesh Gunasekaran's user avatar
4 votes
6 answers
19k views

I am trying to use Unity's built in json serialization. It produces empty string. I do not understand why. (I was trying to use NewtonSoft Json.Net but that wasn't working either even though I was ...
tatmanblue's user avatar
0 votes
2 answers
2k views

I get an error every time I try to parse this .json file. Here is the error: ...
user3262463's user avatar
1 vote
1 answer
470 views

If I had a JSON file that had multiple objects, can the method read through without some form of exception?
Kennichi Nitta's user avatar
0 votes
1 answer
4k views

(I posted a very similar question here recently and the response I received was helpful. But I have been advised to start a new question, and here it is.) I am developing a Unity game which includes ...
WPWPWP's user avatar
  • 101
0 votes
1 answer
4k views

I am developing a Unity game which includes a multiple-choice quiz. I've placed what I believe is a properly-formatted .json file (the quiz question, four answer choices, the correct answer, and an ...
WPWPWP's user avatar
  • 101
2 votes
1 answer
6k views

I'm trying to use Json to hold game dialog in a text asset file. I've tried to make a barebones project to test this and it is failing with the Error Message: ArgumentException: JSON must represent an ...
Big T Larrity's user avatar
1 vote
5 answers
14k views

I've this JSON code like below. How do I parse it to the objects on code below? ...
H. Pauwelyn's user avatar
0 votes
1 answer
384 views

I have a database set up on firebase and when i run my game in the unity edtitor and as a standalone exported Windows .exe file, the call gets made correctly to the database and JSON data gets posted ...
AC007's user avatar
  • 1
1 vote
1 answer
5k views

My settings.json (generated with JsonUtility.ToJson): { "masterVolume": 0.10000000149011612, "fullScreenMode": 1, "cheatsEnabled": false } Offending ...
ag4w's user avatar
  • 101