public class RedditJsonParser extends Object
Constructor and Description |
---|
RedditJsonParser(String string)
It would probably be smarter to use refernces to Stream objects rather than Strings.
|
Modifier and Type | Method and Description |
---|---|
List<RedditAccount> |
parseAccounts()
Parses all Account type Things from a given JSON object.
|
RedditComments |
parseComments()
Comments are a strange beast.
|
RedditJsonMessage |
parseJsonMessage()
This may not work for all Reddit API JSON response 'messages'
Sometimes the message is nested within a "json" key, as is the case for /api/login and /api/comment.
|
List<RedditLink> |
parseLinks()
Parses JSON containing any number of Link type Things.
|
List<RedditMessage> |
parseMessages()
Parses JSON containing any number of Message type Things.
|
List<RedditComment> |
parseMoreChildren()
Parses JSON from a Reddit API morechildren call.
|
List<RedditSubreddit> |
parseSubreddits()
Parses JSON containing any number of Subreddit type Things.
|
public RedditJsonParser(String string)
string
- The entire JSON objectpublic RedditJsonMessage parseJsonMessage() throws RedditException
RedditException
public RedditComments parseComments() throws RedditException
commentsFor
method.RedditException
public List<RedditComment> parseMoreChildren() throws RedditException
RedditException
public List<RedditLink> parseLinks() throws RedditException
RedditException
public List<RedditAccount> parseAccounts() throws RedditException
RedditException
public List<RedditMessage> parseMessages() throws RedditException
RedditException
public List<RedditSubreddit> parseSubreddits() throws RedditException
RedditException
Copyright © 2013. All rights reserved.