Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > JSON/XML data displayed via transformation View modes: 
User avatar
Member
Member
Brian.Kellogg-VinSolutions - 10/24/2012 10:16:37 AM
   
JSON/XML data displayed via transformation
I need to create some sort of web part, or use an existing data source web part that can receive JSON or XML from a WebAPI that I have setup. I know there are XML and web service data sources, however, I don't believe they function the way that we need them to out of the box.

What is the best way to get data to Kentico and have it displayed in a transformation for something like a repeater?

Let me use this example:

Let's say we have staff that we need to get from our WebAPI, and this is what we are returning via either XML or JSON:

FullName
Phone
Email
etc..

How would I get an object to a web part that can be used for a transformation?

User avatar
Member
Member
kentico_davidb2 - 11/2/2012 5:44:05 AM
   
RE:JSON/XML data displayed via transformation
Dear Brian,

I would recommend using the standard XML/Web service data source webparts, and in a case that they do not fulfill your needs, you can clone them and make required customizations.

Dave

User avatar
Member
Member
tony.j.clark-gmail - 11/2/2012 3:14:48 PM
   
RE:JSON/XML data displayed via transformation
I have a service that returns a JSON object. Can the standard XML/Web service data source webparts handle JSON, or do I need to modify the Web service to have XML output?

User avatar
Member
Member
kentico_davidb2 - 11/6/2012 1:27:14 AM
   
RE:JSON/XML data displayed via transformation
Hi Tony,

as you stated above, your service can return data via JSON or XML. If you are able to output data in XML, I think it will be a better solution than customizing the XML data source to recieve JSON.

As for the Web service webpart, that one is suitable for http://msdn.microsoft.com/en-us/library/ms950421.aspx

Dave