private Stream < Object > flatten ( final Object o ) { if ( o instanceof Map < ? , ? > ) { return ( ( Map < ? , ? > ) o ) . values ( ) . stream ( ) . flatMap ( this :: flatten ) ; } return Stream . of ( o ) ; }
Recursively go along yaml nodes beneath the given one to flatten string values