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

  • SEARCH
  • Home
  • 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 7812039
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T04:22:54+00:00 2026-06-02T04:22:54+00:00

So, I have a basic HTML page using jQuery 1.6.2 and I have an

  • 0

So, I have a basic HTML page using jQuery 1.6.2 and I have an MVC application that serves data on a separate domain (The HTML page is local, the MVC application is not). The MVC application is sending back a JSON string just fine; the problem is that when sending back dates, there are a “/” before and after the date which breaks the JSON string, which in turn does not get turned into a javascript object. Phew.

Here is my AJAX call:

$.ajax({ 
  url:url,
  dataType: 'jsonp',
  success: function(data, status, jqXHR) {
    alert(data);
  },
  error: function(jqXHR, textStatus, errorThrown) {
    console.log(jqXHR); console.log(textStatus); console.log(errorThrown);
  }
});

Using the “network” tab in the Chrome profiler, I can see that a JSON string is being returned, and it has the correct data, but has some malformed syntax. Here is a sample of that:

"DateAuthorized":"\/Date(1307789505000-0500)\/",

I tried to use dataType “text”, but because this is a cross-domain request, I have to use jsonp.

Any ideas what-so-ever? Can the MVC application use a regex to remove the slashes? Is there a way to use javascript XHttpRequest to build a manual request?

Agh!

  • 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-02T04:22:56+00:00Added an answer on June 2, 2026 at 4:22 am

    It’s using the default serializer which is the JavaScriptSerializer which has always had this issue. An alternative is to use JSON.NET to serialize your objects.

    You can always implement a replacement from the client-side — parseJSON extension

    …Or format it from the server-side like this before sending it back:

    return new DateTime(2012, 4, 19).ToLongDateString(); // or ToShortDateString()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a basic HTML form that I am centering. I am using jQuery
I have an IE bug that I'm not sure how to fix. Using jQuery
I have an MVC application that I'm using various JsonResult endpoints to populate the
I have a very basic AJAX function in JQuery: $.ajax({ url: http://www.google.com, dataType: html,
I am working on a basic HTML page that requires the user to send
Need basic help using JQuery and AJax. I have an ul <div id=topics> <h1><a
I have a basic html page generated through php and it prints to a
I have a basic web page with an HTML5 SELECT object that has 3
I have a basic HTML form that gets inserted into a server side div
I have just started considering using the HTML 5 api for a Rails/JQuery project,

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.