Package reddit.pojo

Examples of reddit.pojo.SubredditJson


    this.dispatcher = dispatcher;
  }

  @Override
    public void processMessage(String jsonResponse) {
    SubredditJson subreddit = SubredditJsonUnmarshaller.unmarshalJson(jsonResponse);
    logger.info("Json response successfully unmarshalled: {}", jsonResponse);
    dispatcher.dispatchMessage(subreddit.toString());
  }
View Full Code Here


public class SubredditJsonUnmarshaller {

    public static SubredditJson unmarshalJson(String jsonResponse) {
        ObjectMapper objectMapper = new ObjectMapper();
        SubredditJson subredditJson = null;
        try {
            subredditJson = objectMapper.readValue(jsonResponse, SubredditJson.class);
        } catch (Exception e) {
            e.printStackTrace();
            throw new RuntimeException(String.format("unable to unmarshall json [%s]", jsonResponse));
View Full Code Here

TOP

Related Classes of reddit.pojo.SubredditJson

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.