corydissinger / raw4j

Other
48 stars 27 forks source link

RedditAccount contains incorrect values after call to meJson() #16

Open JamesGold23 opened 10 years ago

JamesGold23 commented 10 years ago

I used my own account to test this method. The RedditAccount:

RedditAccount [commentKarma=0, created=1316419867, createdUtc=0, hasMail=null, hasModMail=null, id=5vx5s, linkKarma=0, name=JamesGold, over18=false]

Several of these values are incorrect. However, the HTTP response body contained the correct values, so something is going wrong with the JSON parsing of the body.

corydissinger commented 10 years ago

Good catch. Please pull down the latest commit and verify the values are now being set.

The issue was indeed in the JSON parsing, I failed to notice that the JSON response had _ (underscores) and needed to use Jackson's @JsonProperty annotation to map them.

After you get back to me I'll close the issue.