title: Why I got empty JSON string returned while using setter and getter in the object class in Unity 5.3?
body: <p>I tried to use the new JSON serialization feature in Unity 5.3, and I wrote the following code by reference the usage example provided On Unity website. The only different part that I made was creating the variables of the object class (FruitItem class in my case) by using setter and getter instead of making them pure public variables. By doing this, I only got a pair of braces without any contents inside. However, if I delete the getter and setter and make the class variables to be pure public variables, I will be able to get the correct result. Can anybody provide any hints to me why that happened? Thanks in advance for your help.</p>
  
  <p>Code that works properly:</p>
  
  <pre><code>using UnityEngine;
  using UnityEditor;
  using System.Collections;
  using System;
  
  public class testJson : MonoBehaviour {
  
  
      // Use this for initialization
      void Start () {
  
          FruitItem myFruit = new FruitItem (){ name = "apple", price = 52, quantity = 53 };
  
          string jsonString = JsonUtility.ToJson (myFruit);
          Debug.Log (jsonString);
  
      }
  
  
  
      // Update is called once per frame
      void Update () {
  
      }
  }
  
  [Serializable]
  public class FruitItem{
  
      //using the pure public variables and the output will be:
      //{"name":"apple","quantity":53,"price":52}
  
      public string name;
      public int quantity;
      public int price;
  
  }
  </code></pre>
  
  <p>Code that doesn't work properly:</p>
  
  <pre><code>using UnityEngine;
  using UnityEditor;
  using System.Collections;
  using System;
  
  public class testJson : MonoBehaviour {
  
  
      // Use this for initialization
      void Start () {
  
          FruitItem myFruit = new FruitItem (){ name = "apple", price = 52, quantity = 53 };
  
          string jsonString = JsonUtility.ToJson (myFruit);
          Debug.Log (jsonString);
  
      }
  
  
  
      // Update is called once per frame
      void Update () {
  
      }
  }
  
  [Serializable]
  public class FruitItem{
  
      //using the pure public variables and the output will be:
      //{}
  
      public string name{ get; set;}
      public int quantity{ get; set;}
      public int price{ get; set;}
  
  }
  </code></pre>