fluid-api/src/main/java/com/fluidbpm/program/api/vo/ABaseListing.java
@Override
    @XmlTransient
    public JSONObject toJsonObject() throws JSONException {

        JSONObject returnVal = super.toJsonObject();

        //Listing...
        int listingCountFromListing = 0;
        if(this.getListing() != null && !this.getListing().isEmpty())
        {
            JSONArray jsonArray = new JSONArray();
            listingCountFromListing = this.getListing().size();
            for(T toAdd :this.getListing())
            {
                jsonArray.put(toAdd.toJsonObject());
            }

            returnVal.put(JSONMapping.LISTING, jsonArray);
        }

        //Listing count...
        if(this.getListingCount() == null)
        {
            returnVal.put(JSONMapping.LISTING_COUNT, new Integer(listingCountFromListing));
        }
        else
        {
            returnVal.put(JSONMapping.LISTING_COUNT, this.getListingCount());
        }

        //Listing index...
        if(this.getListingIndex() != null)
        {
            returnVal.put(JSONMapping.LISTING_INDEX, this.getListingIndex());
        }

        //Listing page...
        if(this.getListingIndex() != null)
        {
            returnVal.put(JSONMapping.LISTING_PAGE, this.getListingPage());
        }

        return returnVal;
    }
@Override
    @XmlTransient
    public JSONObject toJsonObject() throws JSONException {

        JSONObject returnVal = super.toJsonObject();

        //Listing...
        int listingCountFromListing = 0;
        if(this.getListing() != null && !this.getListing().isEmpty())
        {
            JSONArray jsonArray = new JSONArray();
            listingCountFromListing = this.getListing().size();
            for(T toAdd :this.getListing())
            {
                jsonArray.put(toAdd.toJsonObject());
            }

            returnVal.put(JSONMapping.LISTING, jsonArray);
        }

        //Listing count...
        if(this.getListingCount() == null)
        {
            returnVal.put(JSONMapping.LISTING_COUNT, new Integer(listingCountFromListing));
        }
        else
        {
            returnVal.put(JSONMapping.LISTING_COUNT, this.getListingCount());
        }

        //Listing index...
        if(this.getListingIndex() != null)
        {
            returnVal.put(JSONMapping.LISTING_INDEX, this.getListingIndex());
        }

        //Listing page...
        if(this.getListingIndex() != null)
        {
            returnVal.put(JSONMapping.LISTING_PAGE, this.getListingPage());
        }

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

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

@see ABaseFluidJSONObject#toJsonObject()