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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T04:31:58+00:00 2026-06-16T04:31:58+00:00

Trying to send json. Here’s my function: var object = … ; $.ajax({ type:

  • 0

Trying to send json. Here’s my function:

var object = ... ;

$.ajax({
      type: 'POST',
      url: '<url>',
      contentType: 'application/json; charset=utf-8',
      dataType: 'json',
      data: object
    });

But whenever I check Chrome, it always sends it as query params:

Request Payload:
startDate=Wed+Dec+19+2012+19%3A00%3A00+GMT-0500+(EST)&endDate=Thu+Dec+20+2012+19%3A00%3A00+GMT-0500+(EST)&

How do I get it to send as JSON?

  • 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-16T04:31:59+00:00Added an answer on June 16, 2026 at 4:31 am

    With JSON.stringify(object)

    Sample:

    $.ajax({
        type: 'POST',
        url: '<url>',
        contentType: 'application/json; charset=utf-8',
        dataType: 'json',
        data: JSON.stringify(object)
    });
    

    Note JSON.stringify is not supported in all browsers (http://caniuse.com/#feat=json ), in particular browsers IE7 and lower.

    If you need to support this browsers too you can use this Javascript library: https://github.com/douglascrockford/JSON-js

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

Sidebar

Related Questions

I am trying to send an object via an ajax POST using JSON payload;
I'm trying to send JSON-object form MongoDB to page with ejs template engine. Here's
I am trying to use jQuery ajax to send a json object to a
I am trying to send a serialized object using JSON. Here is my view
I am trying to send a json RPC ajax request when the page is
I'm trying to send json string in the get request to the server, here
I am trying to send a post request through ajax to another domain and
I'm trying to use the PHP json_encode function to encode some JSON to send
I'm trying to send a Json array over using an AJAX call to a
I'm trying to send some data via JQuery ajax to a grails controller Here's

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.