tags:

views:

221

answers:

1

I have to make dynamic hashes, so the class example won't work since the class variables are static. I am sending in a hashmap object to toJson but it isn't working. Any suggestions on what to do?

+1  A: 

If you can't work out the Gson problem, you might look at Crockford's JSON classes for Java, they deal with this exact use case. Not an answer for the Gson issue, though; just an end-run.

T.J. Crowder