@Override public StructuredOutput property(String name, Object data) { if (getCurrentType() != ElementType.OBJECT && getCurrentType() != ElementType.ARRAY) { throw new IllegalArgumentException("Invalid result structure. Cannot place a property here."); } writeProperty(name, data); nesting.get(0).setEmpty(false); return this; }