I am new to json and trying to get a basic working example.
My http request returns {'username': '1'}, {'username': '1'}.
I am confused as to what actual json looks like, but also how to get it in a string variable for deserialization.
Since ToJson returns {'username': '1'}, I decided that I needed to do this in order to put it in double quotes in order to convert it back.
I am clearly missing something!
class DataItem{
public string username;
}
string json = "{'username': '1'}";
deserialized = JsonUtility.FromJson<DataItem>(json);
Error: ArgumentException: JSON parsing error: missing name for an object member.
source
share