Package org.rssowl.core.internal.interpreter.json

Examples of org.rssowl.core.internal.interpreter.json.JSONObject


    IModelFactory typesFactory = Owl.getModelFactory();
    IFeed feed = typesFactory.createFeed(null, link);
    feed.setBase(readerToHTTP(link));
    try {
      reader = new InputStreamReader(inS, UTF_8);
      JSONObject obj = new JSONObject(new JSONTokener(reader));
      Owl.getInterpreter().interpretJSONObject(obj, feed);
    } catch (JSONException e) {
      isError = true;
      throw new ParserException(Activator.getDefault().createErrorStatus(e.getMessage(), e));
    } catch (IOException e) {
View Full Code Here


  @SuppressWarnings("nls")
  public void testJSON() throws Exception {
    InputStream inS = getClass().getResourceAsStream("/data/interpreter/feed_json.txt");
    IFeed feed = new Feed(new URI("reader://www.data.interpreter.feed_json.txt"));

    JSONObject obj = new JSONObject(StringUtils.readString(new InputStreamReader(inS, "UTF-8")));

    Owl.getInterpreter().interpretJSONObject(obj, feed);

    assertEquals("RSSOwl News", feed.getTitle());
    assertEquals("This is the rssowl.org feed", feed.getDescription());
View Full Code Here

TOP

Related Classes of org.rssowl.core.internal.interpreter.json.JSONObject

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.