Ignore:
Timestamp:
2012-11-23T00:34:36+13:00 (11 years ago)
Author:
davidb
Message:

Support for o=json as output type in Greenstone 3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/core/TransformingReceptionist.java

    r26499 r26506  
    593593        Document theXML = null;
    594594
    595         if (output.equals("xml") || output.equals("clientside"))
     595        if (output.equals("xml") || (output.equals("json")) || output.equals("clientside"))
    596596        {
    597597            // Append some bits and pieces first...
     
    628628            root.appendChild(filepath);
    629629
    630             if (output.equals("xml"))
    631                 return theXML.getDocumentElement();
    632         }
     630            if ((output.equals("xml")) || output.equals("json")) {
     631                // in the case of "json", calling method responsible for converting to JSON-string
     632                return theXML.getDocumentElement();
     633            }
     634        }
     635
    633636
    634637        Element cgi_param_list = (Element) GSXML.getChildByTagName(request, GSXML.PARAM_ELEM + GSXML.LIST_MODIFIER);
Note: See TracChangeset for help on using the changeset viewer.