public static Optional < String > getAttributeAsString ( final JsonObject aJsonObject , final String aAttributeName ) { if ( aJsonObject . has ( aAttributeName ) ) { final JsonElement aElement = aJsonObject . get ( aAttributeName ) ; if ( ! aElement . isJsonNull ( ) ) { return Optional . of ( aElement . getAsString ( ) ) ; } } return Optional . empty ( ) ; }
Gets the value of an attribute