public String toJson(final boolean compact) {
StringWriter sw = new StringWriter();
JsonWriter jw = new JsonWriter(sw, compact);
try {
jw.startObject();
jw.outStringProperty("@unid", getUniversalID());
Set<String> keys = keySet();
for (String key : keys) {
Item currItem = getFirstItem(key);
if (currItem.getMIMEEntity() == null) {
jw.outProperty(key, currItem.getText());