Search Unity

What does the last parameter in JsonFX Deserializer mean?

Discussion in 'Scripting' started by TokyoDan, Mar 7, 2014.

  1. TokyoDan

    TokyoDan

    Joined:
    Jun 16, 2012
    Posts:
    1,080
    I saw a JsonFX Deserialize statement using a parameter that I can't find the meaning of:

    JsonFx.Json.JsonReader.Deserialize<TOTmapData>(map.text)
    I know that TOTmapData is a Class but what is (map.text)? Is that a cast?

    I googled it and found many different examples of that last parameter like (response), (testJson), (sMy), etc. But I can't find any explanation of what it is exactly.
     
  2. Errorsatz

    Errorsatz

    Joined:
    Aug 8, 2012
    Posts:
    555
    Sounds like text is a property of map? Look for the declaration of map and see what type of object it is.
     
  3. Paragon99

    Paragon99

    Joined:
    Nov 23, 2013
    Posts:
    54
    JsonFX.Json.JsonReader is the class
    Deserialize is the method, it is a generic method so <TOTmapData> is the type
    map.text is the string to be deserialized into a TOTmapData object