Search Results

Search found 56255 results on 2251 pages for 'json net'.

Page 69/2251 | < Previous Page | 65 66 67 68 69 70 71 72 73 74 75 76  | Next Page >

  • MVC JSON ViewData Question

    - by user325142
    Can ViewData be set & returned in an ActionResult that returns Json() ? Im asking because It's not working for me but when I put the same ViewData code into a Action method that returns a View() it works? Thanks

    Read the article

  • Need to Post json data using jQuery.ajax

    - by Anil Bhat
    I have a json of the following format which I need to send in the Ajax request through POST method: { “gbus”: [ { "code": "*" } ], “regions”: [ { "code": "*" } ], “offices”: [ { "code": "*" } ], “contracttypes”: [ { "code": "*" } ], “jobnumbers”: [ { "code": "*" } ], “disciplines”: [ { "code": "*" } ] } Its not working for me, giving 500 error always when I try to submit it. Please suggest if you have any idea.

    Read the article

  • Python | How to send a JSON response with name assign to it

    - by MMRUser
    How can I return an response (lets say an array) to the client with a name assign to it form a python script. echo '{"jsonValidateReturn":'.json_encode($arrayToJs).'}'; in this scenario it returns an array with the name(jsonValidateReturn) assign to it also this can be accessed by jsonValidateReturn[1],so I want to do the same using a python script. I tried it once but it didn't go well array_to_js = [vld_id, vld_error, False] array_to_js[2] = False jsonValidateReturn = simplejson.dumps(array_to_js) return HttpResponse(jsonValidateReturn, mimetype='application/json') Thanks.

    Read the article

  • how to get json string value?

    - by Net205
    var responseFromServer = "{\"flag\":true,\"message\":\"\",\"result\":{\"ServicePermission\":true,\"UserGroupPermission\":true}}"; var serializer = new System.Web.Script.Serialization.JavaScriptSerializer(); var responseValue = serializer.DeserializeObject(responseFromServer); responseFromServer value is get a webservice, and then how to get the json string value, such as "flag","Servicepermission"??

    Read the article

  • PHP getting Twitter API JSON file contents without OAuth (Almost have it)

    - by DexCurl
    Hey guys, I have this script working fine with OAuth, but I accidentally nuked my 350 API hits with a stupid while statement :( I'm trying to get data from the Twitter API without OAuth, I can't figure it out (still pretty new), heres what I have <html> <body> <center> <hr /> <br /> <table border="1"> <tr><td>ScreenName</td><td>Followed back?</td></tr> <?php //twitter oauth deets $consumerKey = 'x'; $consumerSecret = 'x'; $oAuthToken = 'x'; $oAuthSecret = 'x'; // Create Twitter API objsect require_once("twitteroauth.php"); $oauth = new TwitterOAuth($consumerKey, $consumerSecret, $oAuthToken, $oAuthSecret); //get home timeline tweets and it is stored as an array $youfollow = $oauth->get('http://api.twitter.com/1/friends/ids.json?screen_name=lccountdown'); $i = 0; //start loop to print our results cutely in a table while ($i <= 20){ $youfollowid = $youfollow[$i]; $resolve = "http://api.twitter.com/1/friendships/exists.json?user_a=".$youfollow[$i]."&user_b=jwhelton"; $followbacktest = $oauth->get($resolve); //$homedate= $hometimeline[$i]->created_at; //$homescreenname = $hometimeline[$i]->user->screen_name; echo "<tr><td>".$youfollowid."</td><td>".$followbacktest."</td></tr>"; $i++; } ?> </table> </center> </body> </html> Neither of the two Twitter functions require authentication, so how can I get the same results? Thanks guys, Dex

    Read the article

  • How can I visually format JSON data (programmatically)?

    - by Ian Robinson
    I'm working with big blobs of JSON. These blobs change slightly over time and a revision history is kept. I'd really like to be able to do a visual diff on them, but my problem is they're being stored without any formatting at all - everything is on one line, so that makes it a little hard to see what changed. Is there a good way to programatically format them ala http://jsonformat.com/ or http://jsonformatter.curiousconcept.com/?

    Read the article

  • C# class to parse JSON result

    - by user285677
    Hi, How should be a c# class to deserialize the folowing JSON string: { "data": [ { "id" : "id0012", "comments": { "data": [ { "id": "123", "from": { "name": "xpto", "id": "5ddd" }, "message": "tttt", "created_time": "2010-01-07T09:16:15+0000" }, { "id": "222", "from": { "name": "wwwww", "id": "343434" }, "message": "3333", "created_time": "2020-07-07T09:30:12+0000" } ], "paging": { "previous": "prevlink", "next": "nextLink" } } } ] } Thanks

    Read the article

  • HTML form to JSON without modern libraries

    - by Rok
    Does anyone know of a simple javascript library that serializes a form DOM object to JSON? I know jQuery has the serialize method but since I am writing an app for IE mobile, I can't use any of the new fancy libraries, must be oldschool simple javascript, as light as possible. Cheers

    Read the article

  • json retrival failed with jquery .each

    - by user545520
    {"paging": {"pageNum":2,"action":"Next","type":"","availableCacheName":"getAllFunds","selectedCacheName":"","showFrom":101,"showTo":200,"totalRec":289,"pageSize":100}, "Data":[{"sourceCodeId":0,"radio_fund":"individua l","availableFunds":[],"fundId":288,"searchName":[],"fundName":"Asian Equity Fund A Class Income","srcFundGrpId":"PGI","firstElement":0,"las tElement":0,"totalElements":0,"pageList":[],"standardExtract":true}] I have json file with above format with two fileds,one paging and one is Data array. I able to retrieve values of paging,but i am not able to retrieve the values of data array with .each function of jquery. Any suggestions or inputs really appreciated.

    Read the article

  • Upload an image from JSON with rails

    - by Dougui
    I have an application created with PhoneGap and Backbone. I upload a file as JSon and my server receive data like this : data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/... I'm trying to write the file like this : File.open("#{Rails.root}/public/images/#{self.id}.jpg", "w+") do |f| f.write(data) end It's not working and I don't know what to do. When I'm trying to open the file I have this message "Not a JPEG file: starts with 0x64 0x61". Do you have a solution?

    Read the article

  • How to navigate around a '[' in JSON.

    - by Kyle
    I'm new to JSON and moving around in it in jQuery. I'm fine until I hit a '[', as in: "gd$when": [{ "startTime": "2006-11-15", "endTime": "2006-11-17", "gd$reminder": [{"minutes": "10"}] }], I tried to do a eventTime = event["gd$when"]["startTime"]; to get to the 'startTime' (Yes, event is the variable for ajax stuff, it's all working fine until I hit the '[') Thanks for any help.

    Read the article

  • jquery json parsing

    - by lolweb
    How do I parse this json with jQuery? DayEvents : [{"0":"886","event_id":"886","1":"5029","user_id":"5029","2":"Professional","user_type":"Professional", ...

    Read the article

  • java json controller

    - by dev
    I have an Java class, like Library, that contains many fields. I want do ajax call to server and in controller's method I want to have partly initialized @RequestBody Library with only fields, which are present in json object. Please Help

    Read the article

  • PHP $array[0] in $string for JSON

    - by user1907696
    I am trying to use PHP to make a JSON file. Part of the code is as follow $array = array("hello", "world"); $string='{"person": [ { "name":'$array[0];', "age":'$array[1];' } ] }'; The file created. However, $array[0] and $array[1] doesn't return the values "hello" and "world" but as $array[0] and $array[1] Any idea? Thanks

    Read the article

  • How should data be passed between client-side Javascript and C# code behind an ASP.NET app?

    - by ctck
    I'm looking for the most efficient / standard way of passing data between client-side Javascript code and C# code behind an ASP.NET application. I've been using the following methods to achieve this but they all feel a bit of a fudge. To pass data from Javascript to the C# code is by setting hidden ASP variables and triggering a postback: <asp:HiddenField ID="RandomList" runat="server" /> function SetDataField(data) { document.getElementById('<%=RandomList.ClientID%>').value = data; } Then in the C# code I collect the list: protected void GetData(object sender, EventArgs e) { var _list = RandomList.value; } Going back the other way I often use either ScriptManager to register a function and pass it data during Page_Load: ScriptManager.RegisterStartupScript(this.GetType(), "Set","get("Test();",true); or I add attributes to controls before a post back or during the initialization or pre-rendering stages: Btn.Attributes.Add("onclick", "DisplayMessage("Hello");"); These methods have served me well and do the job, but they just dont feel complete. Is there a more standard way of passing data between client side Javascript and C# backend code? Ive seen some posts like this one that describe HtmlElement class; is this something I should look into?

    Read the article

  • How to add reflection definition to read JSON files in web game

    - by user3728735
    I have a game which I deployed for desktop and Android. I can read JSON data and create my levels, but when it comes to reading JSON files from web app, I get an error that logs, "cannot read the json file". I researched a lot and I found out that I should add my JSON config class to configurations, so I added this line to gameName.gwt.xml, which is in core folder: <extend-configuration-property name="gdx.reflect.include" value="com.las.get.level.LevelConfig"/> But it did not work out. I have no idea where should I place this line or where I should change to make my web app work, so I can read JSON files.

    Read the article

  • How to add reflection definition to read json files on web game

    - by user3728735
    I have a game which I deployed for desktop and android, I can read json data and create my levels, but the problem is, when it comes to reading json files from web app, I get an error that logs, cannot read the json file, I researched a lot and I found out that I should add my json config class to configurations, I added this line to gameName.gwt.xml, which is in core folder <extend-configuration-property name="gdx.reflect.include" value="com.las.get.level.LevelConfig"/> but it did not work out too, I have no idea where should I place this line, or where should I change to make my web app work, so I can read json files

    Read the article

< Previous Page | 65 66 67 68 69 70 71 72 73 74 75 76  | Next Page >