crowdwalk/src/main/java/nodagumi/Itk/JsonFormatter.java
/**
     * output a term to a buffer with format.
     */
output a term to a buffer with format.
output a term to a buffer with format .
public StringBuilder outputTermToBuffer(StringBuilder buffer,
                                            Term term) {
        boolean prettyPrintP = (overallStyle == OverallStyle.PrettyPrint) ;
        if(overallStyle != OverallStyle.RecordPerLine) {
            if(recordCounter > 0) {
                buffer.append(memberSeparator) ;
                if(prettyPrintP) { buffer.append("\n") ; } ;
            } else {
                if(!prettyPrintP) { buffer.append(" ") ; } ;
            }
        }
        buffer.append(term.toJson(prettyPrintP)) ;
        recordCounter++ ;
        return buffer ;
    }
public StringBuilder outputTermToBuffer ( StringBuilder buffer , Term term ) { boolean prettyPrintP = ( overallStyle == OverallStyle . PrettyPrint ) ; if ( overallStyle != OverallStyle . RecordPerLine ) { if ( recordCounter > 0 ) { buffer . append ( memberSeparator ) ; if ( prettyPrintP ) { buffer . append ( "\n" ) ; } ; } else { if ( ! prettyPrintP ) { buffer . append ( " " ) ; } ; } } buffer . append ( term . toJson ( prettyPrintP ) ) ; recordCounter ++ ; return buffer ; }
output a term to a buffer with format.
output a term to a buffer with format .
// output separater and newline if need. // output body