title: How do you use JSONUtility to read an object with hypens in the keys?
body: <p>I'm using <a href="https://docs.unity3d.com/ScriptReference/JsonUtility.FromJson.html" rel="nofollow noreferrer">JSONUtility</a> to parse input from an external source. Here's an example json payload.</p>
  <pre><code>{
      &quot;test&quot;: &quot;data&quot;,
      &quot;the-problem&quot;: &quot;uh oh&quot;
  }
  </code></pre>
  <p>My problem is working out how to get &quot;the-problem&quot; to go into a field. You can't use hyphens for identifiers in C# - so I can't create a matching object structure for that data to get parsed into.</p>
  <pre><code>[Serializable]
  public class Structure {
      public string test;
      public string theProblem;  // You can't use &quot;the-problem&quot; - see the problem?
  }
  </code></pre>
  <p>Unfortunately, the Unity docs don't talk about this issue.</p>
  <p>Is there a way to mark a field (perhaps with an attribute?) in such a way as to override the name used for serialisation/deserialisation purposes? Preferably without relying on third-party libraries as this unity project targets opengl which doesn't always play well with them.</p>