Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8422879
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T03:34:44+00:00 2026-06-10T03:34:44+00:00

So I do in php $.ajax({ url: ‘parser.php’, type: ‘POST’, data: ‘Data=’ + $.toJSON(schedule),

  • 0

So I do in php

$.ajax({
         url: 'parser.php',
         type: 'POST',
         data: 'Data=' + $.toJSON(schedule),
         success: function (res) {
                  alert(res);
         }
       });

Object that comes to shedule

stdClass object {
   weeks => array (1) (
     [0] => stdClass object {
       0 => stdClass object {}
       1 => stdClass object {}
       2 => stdClass object {}
       3 => stdClass object {}
       4 => stdClass object {}
       5 => stdClass object {}
       6 => stdClass object {}
       alltime => (int) 60
     }
   )
   alltime => (int) 60
   hours => (int) 60
}

How to pass an ajax request to sharepoint 2010?
And then on the server to parse. Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T03:34:45+00:00Added an answer on June 10, 2026 at 3:34 am

    This is extremely easy to do with .NET 4.0. From The Rise Of JSON:

    WebClient webClient = new WebClient();
    dynamic result = JsonValue.Parse(webClient.DownloadString(
        "https://api.foursquare.com/v2/users/self?oauth_token=XXXXXXX"));
    Console.WriteLine(result.response.user.firstName);
    

    Unfortunately SharePoint 2010 is built on top of .NET 3.5 so we can’t use that code.

    Instead, to call a web service we can use something like the code described in Getting data from a REST service using C#:

    public string GetMessage( string endPoint )
    {
        HttpWebRequest request = CreateWebRequest( endPoint );
    
        using ( var response = (HttpWebResponse) request.GetResponse( ) )
        {
            var responseValue = string.Empty;
    
            if ( response.StatusCode != HttpStatusCode.OK )
            {
                string message = String.Format( "POST failed. Received HTTP {0}", 
                    response.StatusCode );
                throw new ApplicationException( message );
            }
    
            // grab the response
            using ( var responseStream = response.GetResponseStream() )
            {
                using ( var reader = new StreamReader( responseStream ) )
                {
                    responseValue = reader.ReadToEnd();
                }
            }
    
            return responseValue;
        }
    }
    

    Then we can use the JavaScriptSerializer to parse to JSON response.

    var serializer = new JavaScriptSerializer();
    var result = serializer.DeserializeObject(response);
    

    The JavaScriptSerializer is a little quirky to work with. If you want something a little more elegant you can use a third-party library like Json.NET to parse the JSON reponse.

    JObject o = JObject.Parse(responseValue);
    

    I hope this helps,

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my document I have this script: $.ajax({ type:POST,url:ajax.php,data:data, success: function() { //onsuccess },
function checkSession(){ $.ajax({url: session.php, success: function(data){ if( data == 1){ var postFilen = 'msg.php';
i have problem.. for(a=1;a<10;a++){ $(.div).append(<div id=+a+></div>) $.ajax({ url: file.php, data: a=+a, type: POST, async:
$.ajax({ method: post , url: save.php , data: id=453&action=test , beforeSend: function(){ } ,
I have the following jQuery script: $(document).ready(function() { $.ajax({ url: 'temp.ajax.php', type: 'GET', success:
I have this piece of code: function MyFunction() { $.ajax({ type: POST, url: ajax.php,
Is the following code correct? $.ajax( { url: './ajax/ajax_addTerms.php', type: 'POST', data: {fId :
for (var i = 0; i < 3; i++){ $.ajax({ url: ajax.php, success: function(data){
I have a jQuery AJAX function like this: $.ajax({ url: 'crud/clients.php', dataType: 'json', type:
I have this code that works well: {livre:empty_name} $.ajax({ url: sent.php, type: post, dataType:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.