Quantcast
Channel: West Wind Message Board Messages
Viewing all articles
Browse latest Browse all 10393

Re: Json Deserialize issue

$
0
0
Re: Json Deserialize issue
Web Connection Wishlist
Re: Json Deserialize issue
Dec. 27, 2012
04:15 am
3OE094CVRShow this entire thread in new window
Gratar Image based on email address
From:Rick Strahl
To:MB

The new de-serializer (JSON.NET) can handle all types of dates. I'm just not sure if the flag for MS AJAX dates needs to be explicitly flipped or whether it's automatically handled. By default ISO dates are auto-parsed for sure.

Output generated from the serializer will always generate dates in ISO format since that's the same format that the native browser serializers use, so this matches the functionality.

Ok, just checked - it works with MS AJAX and ISO dates out of the box and your JSON deserializes just fine.

+++ Rick ---


What I did initially was update the wwJsonSerializer.prg to be 'safe'. We normally replace the framework with all of your files every few months or so. With respect to the dates, the response object has a property called enddate and it is of T type. I did nothing special to have it do that, so that is pretty much perfect if you ask me. I suppose it might be cool for you to add a switch to tell the method what type of dates to respond with to keep it more portable to other databases.


Why not just replace everything and get it up to date. There are no breaking changes between these small version updates...

BTW, did the default JSON deserialization catch the MS AJAX style dates or do those dates return as string? I forgot to explicitly add support for that date style...

+++ Rick ---



Merry Christmas! A few things. I was running 5.64 so that explained why the method was failing. Then i realized i had an old dotnetbridge as well as an old ipstuff. Soooo - it worked perfectly.

Here is a loaded question. Is it safe to replace the dll's that are in production?

wwipstuff.dll
Newtonsoft.Json.dll
wwDotNetBridge.dll



Have you tried the latest version of web connection and deserializejson(), which is new?

I'll check later when I'm near the computer...

+++ Rick---


I should mention that FWIW it does validate here - http://jsonlint.com/


hi there, getting invalid property on this json result. Do we not support this type of response yet in the latest Deserialize() ?

{"StartDate":"\/Date(1356307200000+0000)\/","EndDate":"\/Date(1356307200000+0000)\/","Critiera":[{"siteId":14975}],"LoginId":0,"Records":[{"Impressions":11507,"Clicks":0,"Events":{},"Revenue":0,"Date":"\/Date(1356307200000)\/","FirstDate":"\/Date(1356307200000)\/","LastDate":"\/Date(1356307200000)\/","CTR":0,"Details":[{"Impressions":11507,"Clicks":0,"Events":{},"Revenue":0,"Date":"\/Date(1356307200000)\/","FirstDate":"\/Date(1356307200000)\/","LastDate":"\/Date(1356307200000)\/","CTR":0,"Details":[],"Grouping":{"OptionId":0,"BrandId":0,"CampaignId":0,"SiteId":0,"ZoneId":0,"CreativeId":0,"PublisherAccountId":0,"AdTypeId":0,"ChannelId":0,"Date":0,"MetroCode":0,"PriorityId":0}}]}],"OptionRecords":[],"IsTotal":false,"Id":0,"TotalImpressions":11507,"TotalClicks":0,"TotalCTR":0,"TotalRevenue":0}







Rick Strahl
West Wind Technologies


from Maui, Hawaii

Making waves on the Web


Viewing all articles
Browse latest Browse all 10393

Trending Articles