Questions tagged as 'json'

2
answers

Popular DropDownList with JSON

- Controller - [WebMethod] public ActionResult GetSellers() { List<Seller> sellers = db.Sellers.ToList(); return Json(sellers, JsonRequestBehavior.AllowGet); } - View - @Html.DropDownList("SellerId", null, "-- Select --...
asked by 31.05.2015 / 17:38
1
answer

Array is not converted to JSON

I handle some functions via PHP and in the end I return the AJAX client with useful information. Such information is contained in an array that is converted to JSON by json_encode() . The problem is that I get sent an error message with...
asked by 21.04.2015 / 21:34
1
answer

Communication with the Google Calendar API using REST

I'm using Scribe to authenticate with API of Google Calendar . Authentication with Google is done successfully returning accessToken with no problems. When I try to add a CalendarList , through the following code...
asked by 05.12.2014 / 23:46
1
answer

Syntax created dynamically

I have a syntax (in php) to generate the Json file. But I need this syntax to be created dynamically, that is, according to the result of another class. You're like this: Given the values of a Matrix Coluna 1 - Coluna 2 190 34...
asked by 26.11.2014 / 12:57
2
answers

Handling different returns from JSON

I'm working on an API integration with JSON. I have not implemented anything yet in my C # code, I am currently studying the API but I have already had a question. I have a login method that if successful returns me a type of response, and if...
asked by 18.06.2015 / 16:42
1
answer

How to use the "response" of an XMLHTTPREQUEST in CakePHP (2.5)

CONCLUSION: I put up here to get the view right, I was using onClick to fetch this function, but I was leaving the request out of the function so it was not working. I have an action in the controller Posts: public functi...
asked by 16.01.2015 / 09:19
2
answers

Consume WebService from an external link

When consuming a webService from an external URL through the link in the browser link returns the following JSON message:    {"add-in": "from 9201 to the end - even side (even side belongs to   the "Count"), "neighborhood": "Barreiro"...
asked by 16.01.2015 / 15:37
1
answer

How to upload multiple images to SQL Server using JSON in ASP.Net MVC?

I need to insert a set of information into the SQL Server database data, but along with them some photos along with some strings. I'm looking forward to moving everything through JSON. Input to select the image: <th> <div...
asked by 05.09.2014 / 22:33
2
answers

After selecting with Select2, how do I automatically fill in form fields?

I am creating a form that has a field that the user will enter the company name and Select2 will perform a search in the DB and return the company name to the field, example in the image below: HTMLscript:<scriptlanguage="JavaScript" type=...
asked by 28.07.2014 / 16:16
1
answer

Wrong JSON format web api

I'm having trouble returning json on my mvc 5 api. In the Get method it returns a string in this format: public string Get() { return "{\"data\":[{\"Codigo\":\"AAAA\",\"Finalidade\":\"AAAA\"},{\"Codigo\":\"AAAA\",\"Finali...
asked by 13.05.2014 / 05:05