Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

JSON.net Serialization issue

$
0
0

Hi,

I am using JSON.net and am running into the following strange problem:

System.IO.FileNotFoundException: Could not find file "/system/usr/share/zoneinfo/zoneinfo.version".

when calling SerializeObject():

        JsonSerializerSettings settings = new JsonSerializerSettings
        {
            DateFormatHandling = DateFormatHandling.MicrosoftDateFormat
        };
        string s = JsonConvert.SerializeObject(fleet, settings);

"fleet" is an instance of the Fleet class:

[Serializable]
    public class Fleet
    {
        public int Id { get; set; }
        public int FromTownId { get; set; }
        public int ToTownId { get; set; }

        public string FromName { get; set; }
        public Position FromPosition { get; set; }
        public string ToName { get; set; }
        public Position ToPosition { get; set; }

        public DateTime DepartureTime { get; set; }
        public DateTime ArrivalTime { get; set; }
        public MissionTypeEnum MissionType { get; set; }
        public int Metal { get; set; }
        public int Water { get; set; }
        public int Oil { get; set; }
        public bool IsReturn { get; set; }
        public int BikeRiders { get; set; }
        public int QuadRiders { get; set; }
        public int Spitfires { get; set; }
        public int ArmoredCars { get; set; }
        public int Armors { get; set; }
        public int Katyushas { get; set; }
        public int ManOWars { get; set; }
        public int MiniVans { get; set; }
        public int Trucks { get; set; }
        public int ArmoredBuses { get; set; }
        public int GarbageTrucks { get; set; }
        public int Scouts { get; set; }
    }

Any idea what is going on?


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>