code: private static void addFrameOutput(FramingContext state, Object parent, String property,
              Object output) {
          if (parent instanceof Map) {
              List<Object> prop = (List<Object>) ((Map<String, Object>) parent).get(property);
              if (prop == null) {
                  prop = new ArrayList<Object>();
                  ((Map<String, Object>) parent).put(property, prop);
              }
              prop.add(output);
          } else {
              ((List) parent).add(output);
          }
      }
docs: Adds framing output to the given parent.
  
  @param state
  the current framing state.
  @param parent
  the parent to add to.
  @param property
  the parent property.
  @param output
  the output to add.