Questions tagged [json]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
10 views

Get json response in libgdx

I am trying to get json response in libgdx. Here is my libgdx code. ...
0
votes
1answer
66 views

How to encode a save game / game state as a string?

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 ...
0
votes
1answer
48 views

Get JSON property dynamically in Unity C#?

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 ...
4
votes
2answers
103 views

Is there a way to hardcode a JSON file into a Unity build?

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 ...
0
votes
0answers
32 views

How to import JSON animation file into Cocos Creator using Typescript?

I'm in the process of making a game and I want to import json animation file from remote resource into the game using Typescript, currently using Xampp as the localhost. There is no problem for me to ...
1
vote
1answer
35 views

unity 3d loading data from json problem

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 ...
1
vote
1answer
53 views

How to parse User-defined types from String?

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 ...
0
votes
0answers
18 views

In what way can I handle saving scores to json file in unity?

This is the ScoreManager script, where the score is counted. ...
2
votes
3answers
338 views

unity JsonUtility.ToJson returns empty string

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 ...
0
votes
0answers
33 views

Can I load a background image with TileMap.images (Image Layer from Tiled)?

I'm new to Phaser 3. The documentation seems slightly scattered across the web so I'm hoping someone can finally clear up my confusion. Is it possible to load a background image from ...
0
votes
2answers
296 views

Why can't I read this JSON file?

I get an error every time I try to parse this .json file. Here is the error: ...
1
vote
1answer
103 views

Godot: does parse_json accept multiple JSON objects?

If I had a JSON file that had multiple objects, can the method read through without some form of exception?
0
votes
1answer
558 views

Loading a list of items from JSON, all entries are null

(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 ...
0
votes
1answer
642 views

Trying to load .json questions and answers into a multiple-choice quiz game in Unity

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 ...
0
votes
1answer
817 views

Unity JSON parsing Array of Objects problem - error: JSON must represent an object type

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 ...
1
vote
5answers
3k views

Parse JSON in Unity

I've this JSON code like below. How do I parse it to the objects on code below? ...
0
votes
1answer
81 views

POST JSON method does not work when project has been exported to WEBGL and uploaded to firebase hosting

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 ...
0
votes
1answer
1k views

JSON Parse (Invalid Value)

My settings.json (generated with JsonUtility.ToJson): { "masterVolume": 0.10000000149011612, "fullScreenMode": 1, "cheatsEnabled": false } Offending ...
1
vote
1answer
63 views

LibGDX Json writes only part of class

Hello I've been developing this game for awhile and now trying to implement save data via Json. I've gotten to where when the app is first launched it will write the Json file with the variables I ...
1
vote
1answer
295 views

ds_map_find_value returning number instead of array

Currently messing around on how to make a text engine in GameMaker and figured I would hold all my conversations in JSON format stored in a .txt file, which I'll convert into a ds_map and draw the ...
1
vote
0answers
46 views

Creating Customization System in Unity

I'm making a game with customization system for both characters and weapons and I don't know exactly what's the best way of doing the customizations themselves. I'm thinking of creating separate ...
0
votes
1answer
91 views

Instantiate a sprite using json data value (C# Unity)

Here is my code : BetBoard_Test.cs ...
0
votes
1answer
317 views

C# JSONs not formatting array of objects stored inside another object.

I know the title is a bit confusing because I don't really know how to phrase this. This is what I have: ...
2
votes
1answer
889 views

Invalid character '' in input string at LitJson.Lexer.NextToken ()

Here's my script: ...
1
vote
1answer
2k views

Could not find a part of the path "/jar:file:/data/app

I need a hand on this . On Unity Editor this pretty works fine but when i'm building the apk and try to run my Language Changer function it can't find the path . ...
2
votes
1answer
66 views

Implementing modular game control with JSON/etc. config file?

I'm having trouble wrapping my head around a method to compartmentalize my game control scheme within the game loop in an efficient way. Currently this is basically how my control works in bad ...
0
votes
1answer
36 views

Data not showing properly as per my field in the game

I made the game in android in this game i want first login and registration through JSON object. I have a API link where JSON Object send data from that url to the server but in my server i get the ...
0
votes
1answer
98 views

Formatting Unity data for communication with a REST API

I am pretty new to unity but I am not new to programming. I am building a Hololens application in Unity 2017.2 and it communicates with a REST api that I built. I am using Unity as a front end more or ...
1
vote
1answer
381 views

Can't deserialize parameters from JSON in LibGDX

I am quite new to JSON and I have been having trouble with this data-driven asset manager (not my code). I have been trying to deserialize parameters for my TmxMapLoader object from JSON. It takes the ...
0
votes
2answers
594 views

Still having problems using Json data in Unity

I have the following classes and json file, i thought id followed the documentation exactly but I am clearly wrong. Can anyone see why I get an error just saying : INVALID VALUE in my unity console: ...
1
vote
1answer
7k views

How to create JSON file in notepad that will hold my positional vector3 data for one type of object

I'm trying to get my head around using JSON files to store level data . Specifically in this example is to make my walls. (its a top-down game like pacman). Each wall prefab is a 1x1x1 cube. I just ...
0
votes
1answer
257 views

How can I parse different types of objects from JSON?

I'm trying to save the player's inventory as a JSON data but I'm having a problem. I have a class Sword which extends an abstract class ...
0
votes
2answers
185 views

Relational Databases vs XML vs public static finals: Pros and Cons [closed]

I'm working on a game (single player, metroidvania type, Java) and I'm torn as to how data should be stored. For example, monster stats, dialogues, flavor text for weapons, gear stats... there is all ...
0
votes
1answer
940 views

Binding Nested JSON To Dictionary Not Working

I am creating nested JSON and binding it with the class. But It doesn't bind with the class. JSON: ...
2
votes
1answer
4k views

Unity Json utility does not serialize DateTime

Like the title said the unity json utility does not seem to allow me to serialize the DateTime structure. Just to clarify the problem is that I'm serializing this class: ...
0
votes
1answer
45 views

Loading player position from file but player object not at right position sometimes

In my current project I am developing a game saving system and I have encountered a problem where in some cases when I save the game and re-load it the player will not be loaded in at the correct ...
-1
votes
1answer
291 views

How to use JWT in unity

Is it possible to use JWT in my unity games? I've read here that JWT needs .NET version 3.5+ and in Unity 5.4.1f1 the .NET version is "2.0.50727.1433". Is this information correct or incorrect? If ...
0
votes
0answers
3k views

Convert array of object to json in unity

I need to convert the array of object to json. I have written code to convert object to json. How can I convert the object array to json format ...
0
votes
2answers
1k views

Updating Json files in a Unity game - What am I doing wrong?

I am working in Unity, on my first project. I am working on a turn-based RPG, and I am having a hard time figuring out my back end. I'm currently using JSON files to store my data, which are then ...
1
vote
1answer
738 views

jsonutility doesnt exist in the current context

I am working on converting a string into json format and sending the json formatted data to the server.Everything is working fine. I tested the project and exported the project.Current version of ...
0
votes
1answer
613 views

C# modal to represent Nesting JSON in Unity JSONUtility

I am wanting to build the C# data object to represent the following JSON. I am using unity's JsonUtility. I have used the JSONUtility before but only with a simpler JSON structure. However I am not ...
0
votes
1answer
1k views

Converting to JSON String with JsonUtility.ToJson

I am working on converting and displaying the JSON String with unity. I have done coding for it ...
1
vote
1answer
126 views

Communicate Unity application via a series of Json

I am working on communicating unity application via a series of Json. Since I am new to JSON, I don't have any idea how that work with Wnity. Here is my JSON structure ...
0
votes
1answer
7k views

UPDATED: Deserialise Nested JSON with JSON Utility Unity 5.4 [duplicate]

I am trying to deserialise a JSON with Unity 5.4's JSON utility (here). This is what my JSON looks like: {"series":[{,"points":[{"ts":"1473850836254","value":"11.27"},{"ts":"1473851256637","value":"...
-1
votes
1answer
1k views

Deserialise Nested JSON with JSON Utility Unity 5.4

This is what my JSON looks like: {"series":[{,"points":[{"ts":"1473850836254","value":"11.27"},{"ts":"1473851256637","value":"6.44"}]}]} I am trying to access the values in "points" by calling ...
0
votes
1answer
158 views

Json format to request to Java Server

I have this class in java, I'm using Jersey. ...
2
votes
1answer
434 views

Deserializing component array using JSON

I have a collection of serialized components in JSON format: ...
1
vote
1answer
417 views

Unable to remove class information in serialized json file using libgdx

I am encountering a problem in serializing an array of objects to json file. Please let me know where I'm making the mistake. Object to be serialized : ...
1
vote
1answer
511 views

How to store level data in a libgdx game if implementing ECS pattern

I am writing a beat'em up like game in Libgdx while following the ECS pattern brought up by ashley. For setting up the stage, I am using TileMap and Tiled. An object layer for collisions, and a tile ...
31
votes
5answers
7k views

Use an instance or a class for game resources (wood,iron,gold)

So I'm making a game where you can send ships to locations to sell or buy resources like wood, iron, gold, etc. Now I was wondering how the resources should be created in de game. I came up with 2 ...