http://docs.themoviedb.apiary.io/#reference/timezones/timezoneslist/get
how am I supposed to deserialize this.
shouldn't the JSON be something like this [{ "code" = "AS", "zones": [ "Pacific/Pago_Pago"]}]
فیلم و نمایش تلویزیونی را نمیتوانید پیدا کنید؟ به سیستم وارد شوید تا آن را ایجاد کنید.
آیا میخواهید به این مورد امتیاز دهید یا به فهرست اضافه کنید؟
عضو نیستید؟
پاسخ توسط Travis Bell
در تاریخ نوامبر 2, 2015 ساعت 1:53 ب.ض
Hi Dzivo,
I am not sure what language you are using but for example in Ruby if you were looking for the Canadian timezones, it would look like this:
پاسخ توسط Dzivo
در تاریخ نوامبر 6, 2015 ساعت 12:26 ب.ض
Thx you got me to the solution. I am using c#.
Maybe i am wrong but if you wanted to create dictionary than you should have done something like this
[ { "key1": ["value","value"], "key2":["value","value"]}]
at least thats what you get in java and c# when you serialize dictionary or a map.
if you wanted list of objects than it would be:
[{ "code" = "key", "zones": [ "value"]},{ "code" = "key", "zones": [ "value"]}]
I was able to parse it using linq and reflection. Maybe it will be usefull for someone.
پاسخ توسط Travis Bell
در تاریخ نوامبر 6, 2015 ساعت 12:37 ب.ض
Ya, the response could have been better structured. I just took the list from the timezone lib and converted is straight to JSON and that's what we got. Ah well, an improvement for a future v4! ;)