public String toJson(){
  StringBuilder result=new StringBuilder();
  result.append("{\n");
  boolean notTheFirst=false;
  List<?> entries=getAllParentlessEntries();
  for (  Object entryUncasted : entries) {
    Entry entry=(Entry)entryUncasted;
    if (notTheFirst) {
      result.append(",\n");
    }
    appendIndentation(1,result);
    result.append(JsonBuilder.quote(entry.getId()));
    result.append(": ");
    toJsonEntryHelper(entry,result,1,false,true);
    notTheFirst=true;
  }
  result.append("\n}");
  return result.toString();
}

public String toJson ( ) { StringBuilder result = new StringBuilder ( ) ; result . append ( "{\n" ) ; boolean notTheFirst = false ; List < ? > entries = getAllParentlessEntries ( ) ; for ( Object entryUncasted : entries ) { Entry entry = ( Entry ) entryUncasted ; if ( notTheFirst ) { result . append ( ",\n" ) ; } appendIndentation ( 1 , result ) ; result . append ( JsonBuilder . quote ( entry . getId ( ) ) ) ; result . append ( ": " ) ; toJsonEntryHelper ( entry , result , 1 , false , true ) ; notTheFirst = true ; } result . append ( "\n}" ) ; return result . toString ( ) ; }
api method . converts all of the entries in the database to a json string . it does not include sources or users . this is just for simple visualization of the database . it is helpful for interactive debugging . this is not for exporting as it contains a lot of redundant information . it is also not for unit testing . performance is abysmal .
