question: 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 ( ) ; }
target:  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.