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 6193479
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T03:07:39+00:00 2026-05-24T03:07:39+00:00

Can any one guide, what is wrong with below generated JSON code which are

  • 0

Can any one guide, what is wrong with below generated JSON code which are generated thru asp.net web service’s methods.

---------------------------
Message from webpage
---------------------------
Error: Invalid JSON: <?xml version="1.0" encoding="utf-8"?>

<string xmlns="http://tempuri.org/">[{"id:" '1',"title:" 'Event1',"start:"  1310236200,"end:" 1310236200,"allDay:"true,"description:" 'Event1'},{"id:" '3',"title:" 'Event2',"start:"  1309804200,"end:" 1309804200,"allDay:"true,"description:" 'Event2'},{"id:" '4',"title:" 'Event5',"start:"  1311705000,"end:" 1311705000,"allDay:"true,"description:" 'Event5'},{"id:" '5',"title:" 'Event3',"start:"  1309006800,"end:" 1309006800,"allDay:"false,"description:" 'Event3'},{"id:" '6',"title:" 'Event4',"start:"  1310495400,"end:" 1310495400,"allDay:"true,"description:" 'Event4'},{"id:" '7',"title:" 'Time Event1',"start:"  1312144200,"end:" 1312174800,"allDay:"false,"description:" 'Time Event1'},{"id:" '8',"title:" 'save1',"start:"  1312309800,"end:" 1312309800,"allDay:"true,"description:" 'save1111'},{"id:" '9',"title:" 'today',"start:"  1311273000,"end:" 1311273000,"allDay:"true,"description:" 'today'}]</string>
---------------------------
OK   
---------------------------
  • 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-05-24T03:07:40+00:00Added an answer on May 24, 2026 at 3:07 am

    I think your problem is concluded in wrong request to service. Please see working code:

    Web-service code:

    namespace Test.Service
    {
      [WebService(Namespace = "http://tempuri.org/")]
      [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
      [ToolboxItem(false)]
      [ScriptService]
      public class WebService1 : WebService
      {
        [WebMethod]
        public object HelloWorld()
        {
          // ! return anonymous object. It cannot be serialized to xml and orients solely to json-request.
          return new { value = 12345, name = "John" };
        }
      }
    }
    
    1. getting data via jquery

      <script type="text/javascript"> 
        $(document).ready(function () {
          $.ajax({
              type: "POST",
              contentType: "application/json; charset=utf-8",
              url: "Service/WebService1.asmx/HelloWorld",
              data: "{}",
              dataType: "json",
              success: function (data) {
                alert(data.d.value);
                alert(data.d.name);
              }
          });
        }
      </script>
      
    2. getting data via ASP.NET AJAX

      <asp:ScriptManager ID="_scriptManager" runat="server">
        <Services>
          <asp:ServiceReference Path="Service/WebService1.asmx" />
        </Services>
      </asp:ScriptManager>
      
      <script type="text/javascript"> 
        $(document).ready(function () {
          Test.Service.WebService1.HelloWorld(OnComplete);
      
          function OnComplete(result) {
            alert(result.value);
            alert(result.name);
          }
        }  
      </script> 
      
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can any one help me convert the below code to LINQ? Select Catg,Count(*) From
can any one guide me how to get parameter specially image from the given
Does anyone know of an ASP.NET guide to implementing OpenID and what information can
Can any one explain why the output of this code is only 'hello' and
Can any one tell me how to convert an legacy application which is vb6
Can any one tell me whats wrong in this query var result = from
Can anyone guide me what could be the problem in the mentioned below:- alt
Can any one tell the bit size of boolean in Java?
I'm in active development of an ASP.NET web application that is using server side
I'm building a simple multi-user (multi-tenant?) App with ASP.NET MVC3 and EF4, one database,

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.