Forum Post: RE: REST Application sample project

  • Thread starter Thread starter kraa
  • Start date Start date
Status
Not open for further replies.
K

kraa

Guest
BTW In customer_rest.p... Why use the JsonArray instead of just using an output table for ttcustomer? {"response":{"jsonText":"{\"CustNum\":1,\"Country\":\"USA\",\"Name\":\"Lift Tours\",\"Address\":\"276 North Drive\",\"Address2\":\"\",\"City\":\"Burlington\",\"State\":\"MA\",\"PostalCode\":\"01730\",\"Contact\":\"Gloria Shepley\",\"Phone\":\"(617) 450-0086\",\"SalesRep\":\"HXM\",\"CreditLimit\":66700.00,\"Balance\":903.64,\"Terms\":\"Net30\",\"Discount\":35,\"Comments\":\"This customer is on credit hold.\",\"Fax\":\"\",\"EmailAddress\":\"\"}"}} (any idea why there are backslahes in the response?) compared to: {"response":{"ttcustomer":{"ttcustomer":[{"CustNum":1,"Country":"USA","Name":"Lift Tours","Address":"276 North Drive","Address2":"","City":"Burlington","State":"MA","PostalCode":"01730","Contact":"Gloria Shepley","Phone":"(617) 450-0086","SalesRep":"HXM","CreditLimit":66700.0,"Balance":903.64,"Terms":"Net30","Discount":35,"Comments":"This customer is on credit hold.","Fax":"","EmailAddress":""}]}}} And why isn't there an option just to return: {"CustNum":1,"Country":"USA","Name":"Lift Tours","Address":"276 North Drive","Address2":"","City":"Burlington","State":"MA","PostalCode":"01730","Contact":"Gloria Shepley","Phone":"(617) 450-0086","SalesRep":"HXM","CreditLimit":66700.0,"Balance":903.64,"Terms":"Net30","Discount":35,"Comments":"This customer is on credit hold.","Fax":"","EmailAddress":""}

Continue reading...
 
Status
Not open for further replies.
Back
Top