public static String getJsonFormat(String propValues, String delim) {
   if(propValues == null || propValues.length()==0) { return "";}

      StringBuffer structure = new StringBuffer("");
      structure.append("{\n");
      if (delim == null || delim.length() == 0) { delim = ",";}
      /* Oczekujemy wartoci rozdzielonych przecinkami,
      na przykad: wlasciwosc1,vartosc1,wlasciwosc2,wartosc2  itd. */
      StringTokenizer toke = new StringTokenizer(propValues,delim);
      int j = 0;
      int c =  toke.countTokens();
      for(int i = 1; i <=c; i++) {
         j = i%2;
         if(j != 0) { structure.append(toke.nextToken()).
            append(": ");   }// To jest nazwa waciwoci.
         else { structure.append("\"").append(toke.nextToken()).
            append("\""); // To jest warto waciwoci.
            if(i != c){structure.append(",");}
               structure.append("\n");
            }
         }
         structure.append("}");
         return structure.toString();
}
