parsing JSON via JsonUtility gives a false answer

Hello,

i am trying to aprse a json string like:

{
“EngineStatus”: 1,
“EngineValue”: 10
}

My Model looks like:

[Serializable]
public class ValueModel {

public int EngineValue { get; set; }
public int EngineStatus { get; set; }

}

the execution:

void Start()
{
var json = “{"EngineStatus": "1","EngineValue": "10"}”;
var model = JsonUtility.FromJson(json);

Debug.Log("engine Status: " + model.EngineStatus);
Debug.Log("engine Value. " + model.EngineValue);
}

I am very new to unity, maybe you can help me.

Debug log is always: 0

NOTE i changed the json as from TJHeuvel-net mentioned but it is still the same issue.

“1” and “10” arent integers, they are strings. Also JSONUtility follows Unity’s built in serialization rules, so properties will be skipped.

After googling a bit deeper i found this solution:

and remembered myself, that i had issues with getter and setter before.

so the solution is to delete { get; set; } from my Model.

Thanks four your time, anyway!