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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:34:06+00:00 2026-05-25T13:34:06+00:00

I read that javascript is JSON in other SO posts. I am having difficulty

  • 0

I read that “javascript is JSON” in other SO posts. I am having difficulty translating this theory to my application. I perform a POST with jQuery

    $.ajax({
        type: 'POST',
        url: 'Pricing/Create',
        data: items,
        success: function () { alert('successfully called pricing'); },
        dataType: 'json'
    });

The post successfully hits the breakpoint in my PricingController‘s Create method. In reviewing my Request.QueryString, it is empty.

items is an array of SomeItem with length = 30. Defined as

function SomeItem(description, finalPrice, percentDiscount) {
    this.Description = description;
    this.FinalPrice = finalPrice;
    this.PercentDiscount = percentDiscount;
}

I perform no JSON conversion because “javascript is JSON”. How do I get to my data in the Pricing Controller?


Almost there. When JSON.stringify(items) runs I see a nice set of junk in my alert() (also pretty in Firebug):

[{"Description":"some item","Data2":"$1.00","data3":"10"},//...

But, when it arrives on the server…in C# Request.Form it looks like:

%5b%7b%22Description%22%3a%22some+item%22%2c%22data2%22 wtflip is that…

  • 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-25T13:34:07+00:00Added an answer on May 25, 2026 at 1:34 pm

    Have you tried JSON.stringify() ?

    You can change your data line to:

    data: JSON.stringify(items),
    

    If the target browser doesn’t natively support JSON.stringify(), you can Google for a library to fill in that feature.

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

Sidebar

Related Questions

i need to fetch a url with javascript/jquery and not php. i've read that
I read this article here that talks about progressive enhancement for javascript and the
I read that you could call JavaScript code from a Java Applet by calling
I read that you should define your JavaScript functions in the <head> tag, but
I am trying to debug a JavaScript script that gets read in a Firefox
I am developing some client side Javascript that is using some JSON web services
I have a URL http://myapp.com/get_data that returns an application/json Content-Type . When I browse
Possible Duplicate: Length of Javascript Associative Array I have a JSON that looks like
I read that Domain Driven Design is about concentrating on the problem domain instead
I read that SQL exceptions are treated as normal exceptions in managed SPs; I

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.