2

My server side will reply with json look like {} && {"id":2....} . i use jquery.ajax to GET the response. but i keep getting "error parseerror" , how to parse data like this using jquery.ajax?

2
  • 1
    can you post the complete JSON string so that we can verify the problem? Commented Nov 15, 2011 at 16:04
  • 1
    Can you show us the code that is giving you the error? Commented Nov 15, 2011 at 16:04

2 Answers 2

3

this is not valid jSon.........

Sign up to request clarification or add additional context in comments.

Comments

1

You should return only one json object at a time. If you need to return more than one data model, then build an array or set of objects in the json object.

{itemOne:{}, itemTwo:{}, arrayOfSomething:[]}

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.