generator.writeArrayFieldStart(ExpressionEditorMessageTokens.CONDITIONS_TOKEN);
if (message.getExpression().getConditions().size() > 0) {
for (Condition condition : message.getExpression().getConditions()) {
generator.writeStartObject();
generator.writeFieldName(ExpressionEditorMessageTokens.CONDITION_TOKEN);
generator.writeString(condition.getFunction());
if (condition.getParameters().size() > 0) {
generator.writeArrayFieldStart(ExpressionEditorMessageTokens.PARAMETERS_TOKEN);
for (String param : condition.getParameters()) {
generator.writeString(param);