@ FFDCIgnore ( IOException . class ) public static Map < String , Object > parseExtensions ( Extension [ ] extensions ) { final Map < String , Object > map = new HashMap < String , Object > ( ) ; for ( Extension extension : extensions ) { final String name = extension . name ( ) ; final String key = name . length ( ) > 0 ? StringUtils . prependIfMissing ( name , "x-" ) : name ; Object value = null ; try { value = Json . mapper ( ) . readTree ( extension . value ( ) ) ; } catch ( IOException e ) { value = extension . value ( ) ; } map . put ( key , value ) ; } return map ; }
Collects extensions .