fluid-api/src/main/java/com/fluidbpm/program/api/vo/flow/FlowStepRule.java
@Override
    public JSONObject toJsonObject() throws JSONException
    {
        JSONObject returnVal = super.toJsonObject();

        //Order...
        if(this.getOrder() != null)
        {
            returnVal.put(JSONMapping.ORDER, this.getOrder());
        }

        //Rule...
        if(this.getRule() != null)
        {
            returnVal.put(JSONMapping.RULE, this.getRule());
        }

        //Current Typed Syntax...
        if(this.getCurrentTypedSyntax() != null)
        {
            returnVal.put(JSONMapping.CURRENT_TYPED_SYNTAX,
                    this.getCurrentTypedSyntax());
        }

        //Flow...
        if(this.getFlow() != null)
        {
            returnVal.put(JSONMapping.FLOW, this.getFlow().toJsonObject());
        }

        //Flow Step...
        if(this.getFlowStep() != null)
        {
            returnVal.put(JSONMapping.FLOW_STEP, this.getFlowStep().toJsonObject());
        }

        //Next Valid Syntax Words...
        if(this.getNextValidSyntaxWords() != null && !this.getNextValidSyntaxWords().isEmpty())
        {
            JSONArray jsonArrayOfValidWords = new JSONArray();

            for(String validWord : this.getNextValidSyntaxWords())
            {
                jsonArrayOfValidWords.put(validWord);
            }

            returnVal.put(JSONMapping.NEXT_VALID_SYNTAX_WORDS, jsonArrayOfValidWords);
        }

        return returnVal;
    }
@Override
    public JSONObject toJsonObject() throws JSONException
    {
        JSONObject returnVal = super.toJsonObject();

        //Order...
        if(this.getOrder() != null)
        {
            returnVal.put(JSONMapping.ORDER, this.getOrder());
        }

        //Rule...
        if(this.getRule() != null)
        {
            returnVal.put(JSONMapping.RULE, this.getRule());
        }

        //Current Typed Syntax...
        if(this.getCurrentTypedSyntax() != null)
        {
            returnVal.put(JSONMapping.CURRENT_TYPED_SYNTAX,
                    this.getCurrentTypedSyntax());
        }

        //Flow...
        if(this.getFlow() != null)
        {
            returnVal.put(JSONMapping.FLOW, this.getFlow().toJsonObject());
        }

        //Flow Step...
        if(this.getFlowStep() != null)
        {
            returnVal.put(JSONMapping.FLOW_STEP, this.getFlowStep().toJsonObject());
        }

        //Next Valid Syntax Words...
        if(this.getNextValidSyntaxWords() != null && !this.getNextValidSyntaxWords().isEmpty())
        {
            JSONArray jsonArrayOfValidWords = new JSONArray();

            for(String validWord : this.getNextValidSyntaxWords())
            {
                jsonArrayOfValidWords.put(validWord);
            }

            returnVal.put(JSONMapping.NEXT_VALID_SYNTAX_WORDS, jsonArrayOfValidWords);
        }

        return returnVal;
    }
Conversion to {@code JSONObject} from Java Object.

@return {@code JSONObject} representation of {@code FlowStepRule}
@throws JSONException If there is a problem with the JSON Body.

@see ABaseFluidJSONObject#toJsonObject()