+ Start a Discussion
Tanvi KakkarTanvi Kakkar 

Deserialize json and show in Visual page

I have a json file : 

I need to show this JSON file in VF table .
Need to get the id name and web url in three cloumn in table. 

Please Help . Thanks in advance . 

Hi Tanvi,

I has stored the JSON in the description field on the contact and following code works for you scenario.
read the value in the object structure to display on the page, there are other ways also to do this, but I think if you want to use the apex and visualforce, this is the right approach.
public class MyObject {	    
	public List<ValueWrapper> value;
public class ValueWrapper {
	public String id;
	public String name;
	public String webURL;

String jsonString = [SELECT Id, Description FROM Account WHERE Id='0019000001BHTOD'][0].description;
MyObject obj = (MyObject)JSON.deserialize(jsonString, MyObject.class);

Let me know if this helps