using System.Collections.Generic;
public static void Main()
""Name"" : ""Il Papiro"",
""PickupReference"" : ""IT10001"",
""Subtype"" : ""STANDARD"",
""ExternalReference"" : ""212"",
""SpokenLanguages"" : ""it"",
""State"" : ""IN_ACTIVITY"",
""Operator"" : ""BARTOLINI_ITALY"",
""StorageHeight"" : null,
""StorageNumberOfShelves"" : null,
""ThresholdCalculated"" : 0.0,
""ThresholdCalculatedUpdate"" : null,
""ThresholdContractual"" : null,
""LockerConfiguration"" : """",
""LockerConfigurationSite"" : """",
""LockerPositioning"" : """",
""LockerSharedWithSharedUnit"" : """",
""LockerSharedWith"" : """",
""EndOfActivityDate__c"" : null,
""DeviceType"" : ""BYOD"",
""LastSiteSynchronizationDtm"" : """",
""ActivationDate"" : ""2020-10-19"",
""ActiveThreshold"" : null,
""CollocatedWith"" : """",
""UltimateParent"" : ""Il Papiro""
""ShippingStreetNumber"" : ""5"",
""ShippingStreet"" : ""Largo Europa"",
""StateCode"" : ""16030"",
""ShippingCity"" : ""Moneglia"",
""ShippingPostalCode"" : ""16030"",
""ShippingCountryISO2"" : ""IT"",
""ShippingCountryISO3"" : ""ITA"",
""ShippingCountryCode"" : ""IT"",
""ShippingLatitude"" : 44.2391149,
""ShippingLongitude"" : 9.4889325,
""LocalizationInstruction"" : """",
""AddressLanguage"" : ""it"",
""ShippingStreetComplement"" : """",
""AddressType"" : ""Delivery"",
""TimeZone"" : ""Europe/Rome""
""LastName"" : ""Roberto Celle"",
""Email"" : ""ilpapiro@toto.com"",
""Phone"" : ""0185-49340"",
""ScheduleType"" : ""Public schedule"",
""WeekDay"" : ""Monday"",
""AmStartTime"" : ""09:00"",
""AmEndTime"" : ""19:00"",
""ScheduleType"" : ""Public schedule"",
""WeekDay"" : ""Tuesday"",
""AmStartTime"" : ""09:00"",
""AmEndTime"" : ""19:00"",
""ScheduleType"" : ""Public schedule"",
""WeekDay"" : ""Wednesday"",
""AmStartTime"" : ""09:00"",
""AmEndTime"" : ""19:00"",
""ScheduleType"" : ""Public schedule"",
""WeekDay"" : ""Thursday"",
""ScheduleType"" : ""Public schedule"",
""WeekDay"" : ""Friday"",
""AmStartTime"" : ""09:00"",
""AmEndTime"" : ""19:00"",
""ScheduleType"" : ""Public schedule"",
""WeekDay"" : ""Saturday"",
""AmStartTime"" : ""09:00"",
""AmEndTime"" : ""19:00"",
""ScheduleType"" : ""Public schedule"",
""WeekDay"" : ""Sunday"",
""AmStartTime"" : ""00:00"",
""AmEndTime"" : ""00:00"",
""PmStartTime"" : ""00:00"",
""PmEndTime"" : ""00:00""
""PlatformName"" : ""BRT S.p.A."",
""DepotCode"" : ""0239801""
""Carriername"" : ""BARTOLINI_ITA"",
""PlatformName"" : ""BRT S.p.A."",
""DepotCode"" : ""0239801""
""Carriername"" : ""CHRONOPOST_FRA"",
""CarrierCode"" : ""0872I"",
""PlatformName"" : ""BRT S.p.A."",
""DepotCode"" : ""0239801""
""ServiceName"" : ""Not at home"",
""ServiceName"" : ""Drop-off"",
""Type"" : ""OPERATIONAL_UNAVAILABILITY"",
""StartDate"" : ""2022-02-18"",
""EndDate"" : ""2022-02-21"",
""OthersReason"" : ""covid- erano già chiusi nella settimana dal 14/02 al 18/02 ma non hanno avvisato"",
""StartDate"" : ""2022-02-18"",
""EndDate"" : ""2022-02-24"",
""StartDate"" : ""2021-09-01"",
""EndDate"" : ""2021-09-29"",
""StartDate"" : ""2021-08-07"",
""EndDate"" : ""2021-08-29"",
""AnimationType"" : ""Parcel Anomaly;Preparation of activity;Start Of Activity;Synchronization anomaly""
""AnimationType"" : ""Parcel Anomaly"",
""AnimationType"" : ""Preparation of activity"",
""AnimationType"" : ""Start Of Activity"",
""AnimationType"" : ""Synchronization anomaly"",
byte[] bytes = Encoding.UTF8.GetBytes(json);
using (MemoryStream stream = new MemoryStream(bytes))
using (StreamReader sr = new StreamReader(stream))
using (JsonTextReader reader = new JsonTextReader(sr))
reader.SupportMultipleContent = true;
var serializer = new JsonSerializer();
Console.WriteLine("Jeton Json lu :" +reader.TokenType+" ="+ (reader.Value!=null?reader.Value.ToString():""));
if (reader.TokenType==JsonToken.PropertyName && reader.Value.ToString()=="root")
Console.WriteLine("root trouvé");
if (reader.TokenType == JsonToken.StartObject)
var c = serializer.Deserialize<InternalRoot>(reader);
Console.WriteLine("Référence Pickup "+ c.Account.First().PickupReference);
Console.WriteLine("Jeton Json lu :" +reader.TokenType+" ="+ (reader.Value!=null?reader.Value.ToString():""));
public List<InternalRoot> Root { get; set; }
public string Name { get; set; }
public string PickupReference { get; set; }
public string Type { get; set; }
public string Subtype { get; set; }
public string ParentId { get; set; }
public string ExternalReference { get; set; }
public string SpokenLanguages { get; set; }
public string Industry { get; set; }
public string Sector { get; set; }
public string State { get; set; }
public string Operator { get; set; }
public object StorageDepth { get; set; }
public object StorageHeight { get; set; }
public object StorageNumberOfShelves { get; set; }
public double ThresholdCalculated { get; set; }
public object ThresholdCalculatedUpdate { get; set; }
public object ThresholdContractual { get; set; }
public object StorageWidth { get; set; }
public string LockerConfiguration { get; set; }
public string LockerConfigurationSite { get; set; }
public string SiteType { get; set; }
public string LockerPositioning { get; set; }
public string LockerSharedWithSharedUnit { get; set; }
public string LockerSharedWith { get; set; }
public object EndOfActivityDate__c { get; set; }
public string DeviceType { get; set; }
public string ShippingStreetNumber { get; set; }
public string ShippingStreet { get; set; }
public string State { get; set; }
public string StateCode { get; set; }
public string ShippingCity { get; set; }
public string ShippingPostalCode { get; set; }
public string ShippingCountryISO2 { get; set; }
public string ShippingCountryISO3 { get; set; }
public string ShippingCountryCode { get; set; }
public double ShippingLatitude { get; set; }
public double ShippingLongitude { get; set; }
public string LocalizationInstruction { get; set; }
public string AddressLanguage { get; set; }
public string ShippingStreetComplement { get; set; }
public string AddressType { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public string Email { get; set; }
public string Phone { get; set; }
public string HomePhone { get; set; }
public string ScheduleType { get; set; }
public string WeekDay { get; set; }
public string AmStartTime { get; set; }
public string AmEndTime { get; set; }
public string PmStartTime { get; set; }
public string PmEndTime { get; set; }
public string PlatformName { get; set; }
public string DepotCode { get; set; }
public string Carriername { get; set; }
public string CarrierCode { get; set; }
public string Trigram { get; set; }
public string ServiceName { get; set; }
public string Trigram { get; set; }
public class InternalRoot
public List<Account> Account { get; set; }
public List<Address> Address { get; set; }
public List<Contact> Contact { get; set; }
public List<Schedule> Schedule { get; set; }
public List<Plateform> plateform { get; set; }
public List<Carrier> Carrier { get; set; }
public List<Ability> Ability { get; set; }
public List<object> Period { get; set; }