@Override
    public ImageDataFilterChain create(JSONObject node, ValidationContext ctx)
        throws ValidationException {
      ImageDataFilterChain chain = new ImageDataFilterChain(node, ctx);

      JSONDeserializer.get().deserializeFilters(chain, node, ctx);

      return chain;
    }
예제 #2
0
    @Override
    public Movie create(JSONObject node, ValidationContext ctx) throws ValidationException {
      Movie movie = new Movie(node, ctx);

      JSONValue jval = node.get("filter");

      if (null != jval) {
        JSONObject object = jval.isObject();

        if (null != object) {
          JSONDeserializer.get().deserializeFilters(movie, object, ctx);

          jval = object.get("active");

          JSONBoolean active = jval.isBoolean();

          if (null != active) {
            movie.setFiltersActive(active.booleanValue());
          }
        }
      }
      return movie;
    }