<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">This is what I normally use see also&nbsp;<a href="http://trac.openlayers.org/ticket/2107:">http://trac.openlayers.org/ticket/2107:</a><div><br><div><span class="Apple-style-span" style="font-family: sans-serif; font-size: 14px; "><pre class="wiki" style="background-image: initial; background-repeat: initial; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: rgb(247, 247, 247); border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(215, 215, 215); border-right-color: rgb(215, 215, 215); border-bottom-color: rgb(215, 215, 215); border-left-color: rgb(215, 215, 215); margin-top: 1em; margin-right: 1.75em; margin-bottom: 1em; margin-left: 1.75em; padding-top: 0.25em; padding-right: 0.25em; padding-bottom: 0.25em; padding-left: 0.25em; overflow-x: auto; overflow-y: auto; font-family: monospace; font-size: 10px; background-position: initial initial; ">var protocol = new OpenLayers.Protocol.WFS({ 
    url: "<a href="http://some.url.org">http://some.url.org</a>", 
    featureNS: "<a href="http://namespace.org">http://namespace.org</a>", 
    featureType: "type", 
    formatOptions: {outputFormat: 'json'}, 
    readFormat: new OpenLayers.Format.GeoJSON() 
}); </pre></span><div><br></div><div>Best regards,</div><div>Bart</div><div><br></div><div><div>On Apr 14, 2010, at 8:32 AM, paweluz wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><br>Hi Andreas<br><br>Unfortunately it still does not work. My code for protocol looks now like<br>this:<br><br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;protocol: new OpenLayers.Protocol.WFS({<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;version: "1.1.0",<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;srsName: "EPSG:4326",<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;url: "<a href="http://localhost/geoserver2_0_1/wfs">http://localhost/geoserver2_0_1/wfs</a>",<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;featureNS : &nbsp;"<a href="http://www.openplans.org/topp">http://www.openplans.org/topp</a>",<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;featureType: "bazadanych",<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;geometryName: "the_geom",<br><span class="Apple-tab-span" style="white-space:pre">        </span> &nbsp;&nbsp;&nbsp;outputFormat: "json",<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;readFormat: new OpenLayers.Format.GeoJSON() ,<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;schema:<br>"<a href="http://localhost/geoserver2_0_1/wfs/DescribeFeatureType?version=1.1.0&amp;typename=topp:bazadanych">http://localhost/geoserver2_0_1/wfs/DescribeFeatureType?version=1.1.0&amp;typename=topp:bazadanych</a>",<br><span class="Apple-tab-span" style="white-space:pre">        </span> &nbsp;&nbsp;&nbsp;featurePrefix: "topp"<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;})<br> &nbsp;&nbsp;&nbsp;}); <br><br>I changed line you suggested but still in firebug I can see only GML file as<br>RESPONSE. Are you sure that this is the way I should define the<br>outputFormat. In here <a href="http://trac.openlayers.org/ticket/2107#comment:11">http://trac.openlayers.org/ticket/2107#comment:11</a> I<br>found that my old version was correct. Or maybe in 2.9 version of OL your<br>version is correct.... What else should I try?? <br><br>Regards,<br>Poul <br>-- <br>View this message in context: <a href="http://n2.nabble.com/JSON-format-does-not-work-in-Protocol-WFS-tp4894449p4900100.html">http://n2.nabble.com/JSON-format-does-not-work-in-Protocol-WFS-tp4894449p4900100.html</a><br>Sent from the OpenLayers Users mailing list archive at <a href="http://Nabble.com">Nabble.com</a>.<br>_______________________________________________<br>Users mailing list<br><a href="mailto:Users@openlayers.org">Users@openlayers.org</a><br>http://openlayers.org/mailman/listinfo/users<br><br></div></blockquote></div><br></div></div></body></html>