1

I am sending the JSON object to server in a Java standalone application .

JSON object is :

{"dateFrom":"0001-01-01 12:00:00"
,"dateTo":"2014-03-29 04:34:49"
,"currency":"AUD"
,"requestStatus":null
,"dateTimeCreated":null
,"requestName":"ProjectedFundingRequest"
,"id":"af2e7ceb-c181-4a6b-a212-2867ea5cfded"
,"loginName":"mendiras"
,"securityToken":null
,"jsonString":null}

error : net.sf.json.JSONException: Error while setting property=requestStatus type class java.lang.String

Please let me know what could be the reason for the above error.

10
  • Do you really expect us to guess your code? Commented Mar 4, 2014 at 8:45
  • not really , just wanted to know what could be the reason of this error error : net.sf.json.JSONException: Error while setting property=requestStatus type class java.lang.String , as m new with this :(( Commented Mar 4, 2014 at 8:46
  • 1
    The answer is "a mistake in the code" Commented Mar 4, 2014 at 8:47
  • Actually i havenot changed the existign code . M just sending the JSON object to the server and expecting a response . Commented Mar 4, 2014 at 8:48
  • 1
    post your java class code in which ur sending json\ Commented Mar 4, 2014 at 8:56

2 Answers 2

1

You are passing some null data in your JSON, Make sure server is accept this type of input otherwise at the time of server call it gives a error.

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

Comments

0
Set "requestStatus":null to "requestStatus":"",

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.