private static Map<String, String> toMap(JSONObject j, Map<String, String> map, String prefix) throws JSONException {
    final Iterator<String> keys = j.keys();
    while (keys.hasNext()) {
      final String key = keys.next();
      final Object o = j.get(key);
      if (o instanceof JSONObject) {
        JSONObject jso = (JSONObject) o;
        toMap(jso, map, prefix + key + VALUES_SEPARATOR);
      } else {
        map.put(prefix + key, j.getString(key));
      }
    }
    return map;
  }
Convert Json object to map representation. Nested object are represented by keys like xpath (dot separated)

@param j Json object t convert
@return map representation of json object
@throws JSONException if log can't be parsed into JSON
olv-core/src/main/java/pl/otros/logview/parser/json/JsonExtractor.java