Package jodd.json.model.cat

Examples of jodd.json.model.cat.Catalog


  @Test
  public void testParseCatalogAsObject() throws IOException {
    String json = loadJSON("citm_catalog");

    Catalog catalog = new JsonParser().parse(json, Catalog.class);

    assertCatalog(catalog);
  }
View Full Code Here


  @Test
  public void testParseCatalogAsObjectWithClassname() throws IOException {
    String json = loadJSON("citm_catalog");

    Catalog catalog = new JsonParser().setClassMetadataName("class").parse(json, Catalog.class);

    assertCatalog(catalog);
  }
View Full Code Here

  @Test
  public void testParseSerializeCatalogNotDeep() throws IOException {
    String json = loadJSON("citm_catalog");

    Catalog catalog = new JsonParser().parse(json, Catalog.class);

    String newJson = new JsonSerializer().deep(false).serialize(catalog);

    Catalog jsonCatalog = new JsonParser().parse(newJson, Catalog.class);

    assertNull(jsonCatalog.getPerformances());
    assertNull(jsonCatalog.getAreaNames());
    assertNull(jsonCatalog.getEvents());
    assertNull(jsonCatalog.getAudienceSubCategoryNames());
    assertNull(jsonCatalog.getSeatCategoryNames());
    assertNull(jsonCatalog.getSubTopicNames());
    assertNull(jsonCatalog.getTopicNames());
    assertNull(jsonCatalog.getTopicSubTopics());
    assertNull(jsonCatalog.getVenueNames());
  }
View Full Code Here

  @Test
  public void testParseSerializeCatalog() throws IOException {
    String json = loadJSON("citm_catalog");

    Catalog catalog = new JsonParser().parse(json, Catalog.class);

    String newJson = new JsonSerializer().deep(true).serialize(catalog);

    Catalog jsonCatalog = new JsonParser().parse(newJson, Catalog.class);

    assertCatalog(jsonCatalog);
  }
View Full Code Here

        .useAltPaths()
        .parse(json);

    String newJson = new JsonSerializer().deep(true).serialize(catalog);

    Catalog jsonCatalog = new JsonParser().parse(newJson, Catalog.class);

    assertCatalog(jsonCatalog);
  }
View Full Code Here

TOP

Related Classes of jodd.json.model.cat.Catalog

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.