String message = getAsString( properties, PROPERTY_MESSAGE );
return new PrintError( printer, jobName, message );
}
private String getAsString( JsonObject properties, String property ) {
JsonValue jsonValue = properties.get( property );
if ( jsonValue != null ) {
return jsonValue.asString();
}
return null;
}