Collection<String> nonStringElements = new LinkedList<String>();
Collection<String> attrAsElements = new LinkedList<String>();
addStringsToCollection(arrays, arrayElements);
addStringsToCollection(nonStrings, nonStringElements);
addStringsToCollection(attrAsElems, attrAsElements);
final MappedBuilder configBuilder = JSONConfiguration.mapped().rootUnwrapping(stripRoot);
for (String array : arrayElements) {
configBuilder.arrays(array);
}
for (String nonString : nonStringElements) {
configBuilder.nonStrings(nonString);
}
for (String attrAsElem : attrAsElements) {
configBuilder.attributeAsElement(attrAsElem);
}
JSONConfiguration config = configBuilder.build();
tryWritingBean(jaxbBean, filename, config);
tryReadingBean(filename, jaxbBean, config);
}