JSON library for my specific purpose

I have an external tool that saves date in JSON format. Basically the data is a table (list) of instances of a class similar to the one below:

   private class StoryEventsRow
    {
        public string ID { get; set; }
        public string TYPE { get; set; }
        public int DAY { get; set; }
        public int TIME { get; set; }
        public List< string > CONDITIONS_START { get; set; }
        public List< string > CONDITIONS_ACTIVATE { get; set; }
        public List< string > CONDITIONS_LEAVE { get; set; }
        public string NAME { get; set; }
        public string ACTOR { get; set; }
        public string SPAWN { get; set; }
        public string GOAL { get; set; }
        public string DESPAWN { get; set; }
        public string ACTION { get; set; }
        public string CONVERSATION { get; set; }
        public int TIMEOUT { get; set; }
        public int REPEAT { get; set; }
        public List< string > REWARDS { get; set; }
        public List< string > PENALTIES { get; set; }
    }

I would prefer the JSON library that would deserialize the file directly into:

var events = FantasticJsonLibrary.Deserialize<List<StoryEventsRow>>(inputFile);

Which one form JSON libraries available at Asset Store will be best for this purpose?

I think that almost any library would do.

We use JSON.NET - it is highly rated and works across many Unity platforms without any issues.

1 Like

Try this:
LitJSON : http://lbv.github.io/litjson/

1 Like

Actually not many of them. Only those which support generic deserialization. Many simpler libraries available in the Asset Store only return data as e.g. Hashtable.

Thank you, worked like a charm. Easy to use and free.

Really ? i used 2 libraries (JSON.NET and JsonFx), both support generics

1 Like

Yes, there are much simpler libraries available which are also much more limited.

1 Like

Not necessarily more limited, just not free. :confused: