Parse nested json in unity [duplicate] Parse nested json in unity [duplicate] json json

Parse nested json in unity [duplicate]


The JsonUtility does not support properties. Just remove the { get; set;}

[System.Serializable]public class ProductInfo{    public string title;}[System.Serializable]public class RootObject{    public ProductInfo product_info;}


Unity's JSON implementation is much like what a small child would write for their CS1 project. It's "lacking" at best for any serious JSON usage... ;-)

Recommend using: JSON .NET For Unity if you can pony up for it.

Or... use https://github.com/Bekwnn/UnityJsonHelper if you wish to stick with Unity's JSON implementation. This library solves the exact problem you describe.