View Full Version : Problem with "Load Data" for JSon Store from .NET web service. Problem #2
29 Feb 2012, 11:21 AM
I'm receiving an error when I attempt to "load data" from a .NET web service:
It seems that the Designer is truncating my rootProperty "d" and the first itemTpl key value.
Does anyone know what is going on here ?
29 Feb 2012, 11:29 AM
Paste the full response into jsonlint.com
Does it validate?
29 Feb 2012, 11:47 AM
What's up Aaron.
Correction: Sorry I misunderstood your question.
No the JSON response as interpreted by the store does not validate. Basically what's happening is it's ripping the first key off entirely.
Although, I performed a 2nd test as I showed yesterday and explicitly invoked the AJAX request and set JSON response to the value of a textarea and that response string did validate. This tells me that my .NET web service method is sending valid JSON and the problem is w/ the Designer/Store's interpretation.
I also just noticed something that looks kinda buggy.
When I hard code this valid response string into the data: config on my store and save. When i look at the actual file the quotes are missing around the first key but are present around all subsequent keys like so.
Guess what this doesn't validate on jsonlint.com.
29 Feb 2012, 12:50 PM
What happens in the browser? Outside of designer
29 Feb 2012, 1:14 PM
Aaron are you referring to if I access the web service directly and invoke the method that way ?
If so I get a successful execution of the web service method and the browser renders a response in valid XML.
I'm getting this error for all methods referenced by the Designer on this web service. Here is the url for the particular error message at hand :
29 Feb 2012, 1:17 PM
Whats converting the xml to JSON?
29 Feb 2012, 2:18 PM
Sorry I confused you there with the XML, JSON back and forth. The problem has been identified and here is what we've discovered.
After an hour and 20 minutes troubleshooting this with my manager, we have found out that the Sencha Designer 2 doesn't like rootProperty "d" that is specific to Microsoft.NET's web service JSON response. So this is a snippet of the actual string being returned from the web service:
It gives this error and for some reason removes the first key only starting with the value:
So we created a custom string without the proprietary Microsoft.NET "d" rootProperty and we were able to successfully "load data" to our store in Sencha Designer 2.
Hopefully this will help someone in the future and hopefully you guys can accommodate the .NET "d" rootProperty in future releases of the Sencha Designer 2.
Thanks for the response.
29 Feb 2012, 2:19 PM
Boggled, but will take a look.
Powered by vBulletin® Version 4.1.5 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.