fluid-api/src/main/java/com/fluidbpm/program/api/vo/item/FluidItem.java
@XmlTransient
    public JSONObject convertToFlatJSONObject()
    {
        JSONObject returnVal = new JSONObject();

        //Id...
        returnVal.put(
                FlatFormJSONMapping.FLUID_ITEM_ID,
                this.getId() == null ?
                        JSONObject.NULL : this.getId());

        //Flow State...
        returnVal.put(
                FlatFormJSONMapping.FLOW_STATE,
                (this.getFlowState() == null) ?
                        JSONObject.NULL : this.getFlowState().name());

        //Populate the Form...
        JSONObject formJSONObjFlat =
                (this.getForm() == null) ? null :
                        this.getForm().convertToFlatJSONObject();

        if(formJSONObjFlat != null)
        {
            formJSONObjFlat.keySet().forEach(
                (toAdd) ->
                {
                    returnVal.put(toAdd, formJSONObjFlat.get(toAdd));
                }
            );
        }
@XmlTransient
    public JSONObject convertToFlatJSONObject()
    {
        JSONObject returnVal = new JSONObject();

        //Id...
        returnVal.put(
                FlatFormJSONMapping.FLUID_ITEM_ID,
                this.getId() == null ?
                        JSONObject.NULL : this.getId());

        //Flow State...
        returnVal.put(
                FlatFormJSONMapping.FLOW_STATE,
                (this.getFlowState() == null) ?
                        JSONObject.NULL : this.getFlowState().name());

        //Populate the Form...
        JSONObject formJSONObjFlat =
                (this.getForm() == null) ? null :
                        this.getForm().convertToFlatJSONObject();

        if(formJSONObjFlat != null)
        {
            formJSONObjFlat.keySet().forEach(
                (toAdd) ->
                {
                    returnVal.put(toAdd, formJSONObjFlat.get(toAdd));
                }
            );
        }
@ XmlTransient public JSONObject convertToFlatJSONObject ( ) { JSONObject returnVal = new JSONObject ( ) ; //Id... returnVal . put ( FlatFormJSONMapping . FLUID_ITEM_ID , this . getId ( ) == null ? JSONObject . NULL : this . getId ( ) ) ; //Flow State... returnVal . put ( FlatFormJSONMapping . FLOW_STATE , ( this . getFlowState ( ) == null ) ? JSONObject . NULL : this . getFlowState ( ) . name ( ) ) ; //Populate the Form... JSONObject formJSONObjFlat = ( this . getForm ( ) == null ) ? null : this . getForm ( ) . convertToFlatJSONObject ( ) ; if ( formJSONObjFlat != null ) { formJSONObjFlat . keySet ( ) . forEach ( ( toAdd ) - > { returnVal . put ( toAdd , formJSONObjFlat . get ( toAdd ) ) ; } ) ; }
Serialize {@code this} object into a JSONObject.

Any fields provided with a Java {@code null} value will be stored
as {@code JSONObject.Null}. {@code Field.Type.Table} fields are not supported and will be skipped.

@return Flat {@code JSON} object (No inner fields).

@see JSONObject
Serialize { @code this } object into a JSONObject .