APISonar


org.geoserver.wfs.json.JSONType.json

> org > geoserver > wfs > json > JSONType > json
org APIs geoserver APIs wfs APIs json APIs JSONType APIs json APIs

Example 1
private void testJsonException(String wfsVersion)
            throws UnsupportedEncodingException, Exception {

        String path = getPath(wfsVersion);
        MockHttpServletResponse response =
                getAsServletResponse(path + "&EXCEPTIONS=" + JSONType.json);

        // MimeType
        assertEquals(JSONType.json, response.getContentType());

        // Content
        String content = response.getContentAsString();
        testJson(content, wfsVersion);
    }
Example 2
public void testSimpleJSON() throws Exception {
    	String layer = MockData.FORESTS.getPrefix() + ":" + MockData.FORESTS.getLocalPart();
        String request = "wms?version=1.1.1"
                + "&request=DescribeLayer" +
                "&layers=" + layer +
                "&query_layers=" + layer + 
                "&width=20&height=20"+
                "&outputFormat=" +JSONType.json;
        
        String result = getAsString(request);
        
        checkJSONDescribeLayer(result, layer);
    }