Ajax post - is there any way to get actual JSON?

Ajax post - is there any way to get actual JSON?

DaemachDaemach Posts: 9Questions: 2Answers: 0

In both POST and GET modes, rather than an actual JSON object, I get a collection of fields that mimic arrays of objects. This is kind of messy with the backend I use. Is there a flag somewhere that will post an actual nested JSON object that I can deserialize?

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,237Questions: 1Answers: 2,599

    We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

  • DaemachDaemach Posts: 9Questions: 2Answers: 0

    You shouldn't need a test case for this.

    Please see this screenshot: https://www.screencast.com/t/Cf4fDGTVc

  • kthorngrenkthorngren Posts: 21,172Questions: 26Answers: 4,922
    Answer ✓

    Your screenshot clears up what you are asking about. Thats why Colin asked for a test case. You can use ajax.data to convert to JSON string. See the last example in the docs.

    Kevin

This discussion has been closed.