@Override public JsonParser skipChildren() throws IOException, JsonParseException { IonType currentType = reader.getType(); if (IonType.isContainer(currentType)) { shouldSkipContainer = true; currentToken = currentType == IonType.STRUCT ? JsonToken.END_OBJECT : JsonToken.END_ARRAY; } return this; }
@Override public StructuredJsonGenerator writeFieldName(String fieldName) { writer.setFieldName(fieldName); return this; }
@Override public double getDoubleValue() throws IOException { return reader.doubleValue(); }
@Override public StructuredJsonGenerator writeValue(Date date, TimestampFormat timestampFormat) { try { writer.writeTimestamp(Timestamp.forDateZ(date)); } catch (IOException e) { throw new SdkClientException(e); } return this; }
@Override public String getCurrentName() throws IOException { return reader.getFieldName(); }
@Override public int getIntValue() throws IOException { return reader.intValue(); }
@Override public BigInteger getBigIntegerValue() throws IOException { return reader.bigIntegerValue(); }
@Override public NumberType getNumberType() throws IOException { switch (reader.getType()) { case DECIMAL: return NumberType.BIG_DECIMAL; case FLOAT: return NumberType.DOUBLE; case INT: return NumberType.BIG_INTEGER; default: return null; } }
@Override public StructuredJsonGenerator writeValue(double val) { try { writer.writeFloat(val); } catch (IOException e) { throw new SdkClientException(e); } return this; }
@Override public StructuredJsonGenerator writeValue(int val) { try { writer.writeInt(val); } catch (IOException e) { throw new SdkClientException(e); } return this; }
@Override public long getLongValue() throws IOException { return reader.longValue(); }
@Override public BigDecimal getDecimalValue() throws IOException { return reader.decimalValue(); }
@Override public StructuredJsonGenerator writeValue(String val) { try { writer.writeString(val); } catch (IOException e) { throw new SdkClientException(e); } return this; }
@Override public StructuredJsonGenerator writeNull() { try { writer.writeNull(); } catch (IOException e) { throw new SdkClientException(e); } return this; }
@Override public StructuredJsonGenerator writeEndObject() { try { writer.stepOut(); } catch (IOException e) { throw new SdkClientException(e); } return this; }
@Override public StructuredJsonGenerator writeValue(boolean bool) { try { writer.writeBool(bool); } catch (IOException e) { throw new SdkClientException(e); } return this; }
@Override public float getFloatValue() throws IOException { return (float) reader.doubleValue(); }
@Override public StructuredJsonGenerator writeValue(float val) { try { writer.writeFloat(val); } catch (IOException e) { throw new SdkClientException(e); } return this; }
@Override public StructuredJsonGenerator writeValue(BigInteger value) { try { writer.writeInt(value); } catch (IOException e) { throw new SdkClientException(e); } return this; }