List containedSB = sbSubConfig.getContainedSourceBeanAttributes();
int numberOfSb = containedSB.size();
int sbCounter = 1;
//standard tag attributes
for(int i =0; i< subAtts.size(); i++){
SourceBeanAttribute object = (SourceBeanAttribute)subAtts.get(i);
if (object.getValue() instanceof SourceBean){
String key=(String)object.getKey();
if(key.endsWith("_LIST")){
String arrayKey = key.substring(0, key.indexOf("_LIST"));
toReturn.write(" " + convertKeyString(arrayKey) +": [ \n");
toReturn = getAllArrayAttributes(object, toReturn);
toReturn.write(" ]\n");
}else{
toReturn.write(" " + convertKeyString(key) +": { \n");
toReturn = getAllAttributes(object, toReturn);
toReturn.write(" }\n");
}
if(i != subAtts.size()-1){
toReturn.write(" , ");
}
sbCounter++;
}else{
SourceBeanAttribute subObject2 = (SourceBeanAttribute) subAtts.get(i);
toReturn = writeTagAttribute(subObject2, toReturn, false);
if(i != subAtts.size()-1){
toReturn.write(" , ");
}
}