private static String fieldsToStringPretty(JsonObject jsonObj,int level){
  StringBuffer buf=new StringBuffer();
  String indent="\n" + VAUtils.indent(level);
  boolean firstField=true;
  for (  Map.Entry<String,JsonElement> entry : jsonObj.entrySet()) {
    String field=entry.getKey();
    if (!field.equals(CHILDREN_PROP) && !field.equals("src-loc")) {
      if (!firstField)       buf.append(",");
      if (level == 1 && firstField)       buf.append(" ");
 else       buf.append(indent);
      firstField=false;
      buf.append(field);
      buf.append(": ");
      JsonElement value=entry.getValue();
      buf.append(toStringPretty(value,level + 1));
    }
  }
  return buf.toString();
}

private static String fieldsToStringPretty ( JsonObject jsonObj , int level ) { StringBuffer buf = new StringBuffer ( ) ; String indent = "\n" + VAUtils . indent ( level ) ; boolean firstField = true ; for ( Map . Entry < String , JsonElement > entry : jsonObj . entrySet ( ) ) { String field = entry . getKey ( ) ; if ( ! field . equals ( CHILDREN_PROP ) && ! field . equals ( "src-loc" ) ) { if ( ! firstField ) buf . append ( "," ) ; if ( level == 1 && firstField ) buf . append ( " " ) ; else buf . append ( indent ) ; firstField = false ; buf . append ( field ) ; buf . append ( ": " ) ; JsonElement value = entry . getValue ( ) ; buf . append ( toStringPretty ( value , level + 1 ) ) ; } } return buf . toString ( ) ; }
returns a pretty printed string of the field values for the given json object , indented at the given level .
