if (valueObject == null) {
return "null";
} else if (valueObject instanceof ValueString) {
return '"' + valueObject.toString() + '"';
} else if (valueObject instanceof ValueArray) {
ValueArray asArray = (ValueArray) valueObject;
StringBuilder builder = new StringBuilder();
builder.append('[');
for (int i = 0; i < asArray.size(); i++) {
builder.append(printValueObject(asArray.get(i)));
if (i < asArray.size() - 1) {
builder.append(" , ");
}
}
builder.append(']');
return builder.toString();