This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java in General and the fly likes Problem with JSONSerializer.toJSON Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Problem with JSONSerializer.toJSON" Watch "Problem with JSONSerializer.toJSON" New topic
Author

Problem with JSONSerializer.toJSON

Jayavardhan geepi
Ranch Hand

Joined: Jul 21, 2010
Posts: 66
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

Joined: Oct 27, 2005
Posts: 19655
    
  18

Can you post the results of the following two lines when you catch that InvocationTargetException:


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with JSONSerializer.toJSON
 
Similar Threads
Searching google images from java code
Json Parser
JSON Syntax error
how to, JSON data
How can i pass the JSONObject to the servlet