private void loadEntireJsonObject ( JSONObject json ) throws JSONException { Iterator < ? > it = json . keys ( ) ; while ( it . hasNext ( ) ) { // This key is something like core-site.xml or hdfs-site.xml Object obj = it . next ( ) ; if ( ! ( obj instanceof String ) ) { LOG . warn ( "Object not instance of string : " + obj + " skipping" ) ; continue ; } String key = ( String ) obj ; JSONObject partition = json . getJSONObject ( key ) ; loadJsonResource ( partition , properties , key ) ; } }
Loads an entire json configuration object which would mostly contain many sub - sections like core - site . xml and hdfs - site . xml