Hello everyone, i have been working with a coworker with json in dynamoDB. when i try to do a query, DynamoDB showme the next json Code (CSharp): [ { "n_request":"", "posicion":"", "velocidad":"", "client_id":"r2", "status":"free", "PartitionKey":3.0 }, { "n_request":"", "posicion":"", "velocidad":"", "client_id":"r1", "status":"free", "PartitionKey":2.0 }, { "n_request":"", "posicion":"", "velocidad":"", "client_id":"c2", "status":"free", "PartitionKey":1.0 }, { "n_request":"", "posicion":"", "velocidad":"", "client_id":"c1", "status":"free", "PartitionKey":0.0 } ] i do the deserialisation with one simple json and works. but when i try to deserialize this complex json i can't. here are objects and C# code. Code (CSharp): public class JsonObjects { public DockiData[] allDockiData; } [Serializable] public class DockiData { public string n_request; public string posicion; public float velocidad; public string client_id; public string status; public string PartitionKey; public int posX, posY; char[] deleteLetters = { '[', ']', ',' }; public void SplitPos() { string[] positions = posicion.Split(deleteLetters, 4, StringSplitOptions.None); posX = int.Parse(positions[1]); posY = int.Parse(positions[2]); } } and in here i deserialize the json Code (CSharp): IEnumerator RequestJson() { UnityWebRequest carInformation = UnityWebRequest.Get(url); yield return carInformation.SendWebRequest(); if (carInformation.isHttpError || carInformation.isNetworkError) { Debug.Log(carInformation.error); } else { string json = carInformation.downloadHandler.text; print(json); clients = JsonUtility.FromJson<JsonObjects>(json); } } when i run the project apear the next issue: ArgumentException: JSON must represent an object type. UnityEngine.JsonUtility.FromJson (System.String json, System.Type type) (at <0618d0873e03447096799ae90b4ad4f1>:0) UnityEngine.JsonUtility.FromJson[T] (System.String json) (at <0618d0873e03447096799ae90b4ad4f1>:0) JsonLoader+<RequestJson>d__5.MoveNext () (at Assets/Scripts/JsonScripts/JsonLoader.cs:46) UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <c62cc0ef748e4107b21e2999fa50d73a>:0) thanks for your help and regards.
your json is a naked array, which JsonUtility doesn't support. You must wrap it in a json object, as such: Code (JavaScript): { "allDockiData": [ // your json array here ] }