This is a migrated thread and some comments may be shown as answers.

need sample example for nested json object

3 Answers 194 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
Prashant
Top achievements
Rank 1
Prashant asked on 16 Apr 2012, 05:41 AM
Hi All,

Can somebody give sample example to get JSON Object through Webservice and print it in html page.

I am trying but unable to print it.

I want to print below JSON object.

{"GetClientListResult":[{"Client_ContactNumber":"333333","Client_EmailId":"smith@123.com","Client_Id":3,"Client_Image":"http:\/\/122.170.2.155:9092\/TR_Service\/Image\/3.jpg","Client_Name":"Mr. SMITH","ReplyErrorMessage":null},{"Client_ContactNumber":"444444","Client_EmailId":"williams@123.com","Client_Id":4,"Client_Image":"http:\/\/122.170.2.155:9092\/TR_Service\/Image\/4.jpg","Client_Name":"Mr. WILLIAMS","ReplyErrorMessage":null},{"Client_ContactNumber":"555555","Client_EmailId":"rohan@123.com","Client_Id":5,"Client_Image":"http:\/\/122.170.2.155:9092\/TR_Service\/Image\/5.jpg","Client_Name":"Mr. ROHAN","ReplyErrorMessage":null},{"Client_ContactNumber":"666666","Client_EmailId":"rishab@123.com","Client_Id":6,"Client_Image":"http:\/\/122.170.2.155:9092\/TR_Service\/Image\/6.jpg","Client_Name":"Mr.RISHAB","ReplyErrorMessage":null},{"Client_ContactNumber":"777777","Client_EmailId":"jonathan@123.com","Client_Id":7,"Client_Image":"http:\/\/122.170.2.155:9092\/TR_Service\/Image\/7.jpg","Client_Name":"Mr. JONATHAN","ReplyErrorMessage":null},{"Client_ContactNumber":"111111","Client_EmailId":"jeff_devis@123.com","Client_Id":1,"Client_Image":"http:\/\/122.170.2.155:9092\/TR_Service\/Image\/1.bmp","Client_Name":"Mr. JEFF DEVIS","ReplyErrorMessage":null},{"Client_ContactNumber":"222222","Client_EmailId":"wilson@123.com","Client_Id":2,"Client_Image":"http:\/\/122.170.2.155:9092\/TR_Service\/Image\/2.jpg","Client_Name":"Mr. WILSON","ReplyErrorMessage":null}]}

3 Answers, 1 is accepted

Sort by
0
Sajid
Top achievements
Rank 1
answered on 16 Apr 2012, 07:53 AM
For php webservice u can use this code, works fine 

<?php 
header("Content-type: application/json"); 
header('Access-Control-Allow-Origin: *');

$classmates[0] = array('text' =>'raju');
$classmates[1] = array('text' =>'sameer'); 


echo "{\"results\":" .json_encode($classmates). "}";
?>
0
Prashant
Top achievements
Rank 1
answered on 16 Apr 2012, 09:27 AM
thanks Sajid,

But i want to print it in HTML page using kendoui. We have written server side programing in Dot net and not in php.

Could you please put more light on how to achieve this using kendoui.
0
Prashant
Top achievements
Rank 1
answered on 23 Apr 2012, 11:52 AM
Hi Guys,
Could you please reply or let me know if you need more details.
Tags
Data Source
Asked by
Prashant
Top achievements
Rank 1
Answers by
Sajid
Top achievements
Rank 1
Prashant
Top achievements
Rank 1
Share this question
or