code: public String flatten() {
      flattenAsMap();
  
      if (source.isObject() || isObjectifiableArray())
        return flattenedMap.toString(printMode);
      else
        return javaObj2Json(flattenedMap.get(ROOT));
    }
docs: Returns a flattened JSON string.
  
  @return a flattened JSON string