private void parseObject(final VPackSlice value, final StringBuilder json, final boolean includeNullValues) throws VPackException { json.append(OBJECT_OPEN); int added = 0; for (final Iterator<Entry<String, VPackSlice>> iterator = value.objectIterator(); iterator.hasNext();) { final Entry<String, VPackSlice> next = iterator.next(); final VPackSlice nextValue = next.getValue(); if (!nextValue.isNull() || includeNullValues) { if (added++ > 0) { json.append(SEPARATOR); } parse(value, next.getKey(), nextValue, json, includeNullValues); } } json.append(OBJECT_CLOSE); }
private void parseArray(final VPackSlice value, final StringBuilder json, final boolean includeNullValues) throws VPackException { json.append(ARRAY_OPEN); int added = 0; for (int i = 0; i < value.getLength(); i++) { final VPackSlice valueAt = value.get(i); if (!valueAt.isNull() || includeNullValues) { if (added++ > 0) { json.append(SEPARATOR); } parse(value, null, valueAt, json, includeNullValues); } } json.append(ARRAY_CLOSE); }
final Object value; final Type realType = determineType(vpack, type); if (vpack.isNull()) { final VPackDeserializer<?> deserializer = getDeserializerWithSelfNullHandle(fieldName, realType); if (deserializer != null) {
@Override public T deserialize(final Response response) throws VPackException { final VPackSlice body = response.getBody(); if (body != null) { final VPackSlice result = body.get(ArangoResponseField.RESULT); if (!result.isNone() && !result.isNull()) { return util(Serializer.CUSTOM).deserialize(result, type); } } return null; } };
private Object readSimple(final Class<?> type, final VPackSlice source) { if (source.isNone() || source.isNull()) { return null;
private Object readSimple(final Class<?> type, final VPackSlice source) { if (source.isNone() || source.isNull()) { return null;
} else if (value.isDate()) { json.append(toJSONString(DateUtil.format(value.getAsDate()))); } else if (value.isNull()) { json.append(NULL); } else {