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?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.