private void parseLanguageMatchingFix(JsonObject root) {
    JsonObject node = resolve(root, "supplemental", "languageMatching", "written_new");
    JsonArray matches = node.getAsJsonArray("languageMatch");
    for (JsonElement element : matches) {
      JsonObject value = (JsonObject) element;
      String desired = string(value, "desired");
      String supported = string(value, "supported");
      Integer distance = Integer.parseInt(string(value, "distance"));
      boolean oneway = string(value, "oneway", null) != null;
      
      LanguageMatch match = new LanguageMatch(desired, supported, distance, oneway);
      languageMatching.languageMatches.add(match);
    }
    
    JsonObject variables = resolve(node, "matchVariable");
    for (Map.Entry<String, JsonElement> entry : variables.entrySet()) {
      String value = entry.getValue().getAsString();
      languageMatching.matchVariables.add(Pair.pair(entry.getKey(), value));
    }
    
    for (String code : string(node, "paradigmLocales").split("\\s+")) {
      languageMatching.paradigmLocales.add(code);
    }
  }
private void parseLanguageMatchingFix ( JsonObject root ) { JsonObject node = resolve ( root , "supplemental" , "languageMatching" , "written_new" ) ; JsonArray matches = node . getAsJsonArray ( "languageMatch" ) ; for ( JsonElement element : matches ) { JsonObject value = ( JsonObject ) element ; String desired = string ( value , "desired" ) ; String supported = string ( value , "supported" ) ; Integer distance = Integer . parseInt ( string ( value , "distance" ) ) ; boolean oneway = string ( value , "oneway" , null ) != null ; LanguageMatch match = new LanguageMatch ( desired , supported , distance , oneway ) ; languageMatching . languageMatches . add ( match ) ; } JsonObject variables = resolve ( node , "matchVariable" ) ; for ( Map . Entry < String , JsonElement > entry : variables . entrySet ( ) ) { String value = entry . getValue ( ) . getAsString ( ) ; languageMatching . matchVariables . add ( Pair . pair ( entry . getKey ( ) , value ) ) ; } for ( String code : string ( node , "paradigmLocales" ) . split ( "\\s+" ) ) { languageMatching . paradigmLocales . add ( code ) ; } }
Parse enhanced language matching fix tree.