This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with JSONSerializer.toJSON

 
Jayavardhan geepi
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Firstly I apologize if I'm posting in a wrong section of the forum.

I have JSONObject object = (JSONObject)JSONSerializer.toJson(obj) ;

which works fine when my 'obj' doesn't have values for fields of type java.sql.Timestamp.

But when values for these timestamp field are set, it is throwing "InvocationTargetException".

I'm using net.sf.json library of version 2.0.

Can some one help please?
 
Rob Spoor
Sheriff
Pie
Posts: 20546
57
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you post the results of the following two lines when you catch that InvocationTargetException:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic