Parse json from Xquery -


I am working on the XML project and I have a problem when I try to connect a json file in my Xquery I do

I will explain my problem with more details:

I do not know how to read a JSON file in Exxury, I have URL in EXWEER (this is a JSO file for this URL), And that URL is next:

  http://discomap.eea.europa.eu/ArcGIS/rest/services/Admin/EuroBoundaries_Dyna_WGS84/MapServer/2/query?text=&geometry= 16.4027431529776,57.0126631873995 and the geometric type = esriGeometryPoint & amp; InSR = & amp; SpatialRel = esriSpatialRelIntersects and where = & amp; Amp; Amp; Amp; Geometry = Incorrect & amp; OutSR = & amp; Outfield = NUTS_CODE & amp; F. JSON: "ICC", "ICC", "NUTS_CODE": "NUTS_CODE"}, "FEATURES": ["Displayfield Named": "ICC", "Field Alive ": {" ICC ": [{" Attributes ": {" ICC ":" SE "," NUTS_CODE ":" SE21 "}}}}  

The file must be read in Exxury or the function to convert this Jason file to XML file must be found.

Through the Internet, I found this code:

We import the JSO module where they are functions, but the following URLs do not work so it is impossible to parse this function is.

  import module namespace json = "http://www.zorba-xquery.com/ jorba / json-actions"; The declared function xmlconv: RestWEB () {$ $ var: = "& amp; Let $ datocor1: =" 16.4027431529776, "$$ datocor2: =" 57.0126631873995 "Give $ $ 1: = CONSAT (" geometry = ", $ Give $ dat2: = "Geometry type = esriGeometryPoint", $ dat3: = "INSR =" $ dat4: = "SPEALILE REL = SERSTIAL REAL INTERNET", $ D $ 5: = "where =" Give $ dt6: = "Return Gemetry = Dootle", $ Dat7: = "Out SR =" $ Dat8: = "Outfields = NUTS_CODE" $ dat9: = "f = json" $ url Initial: = Context ($ $ Var, $ dat1, $ var, $ dat2, $ var, $ dat3, $ var, $ dat4, $ var, $ dat5, $ $) $ $ $ $ $ ($ $ $ Var, $ dat7, $ var, $ dat8, $ var, $ dat9) $ URLFinal: = concat ($ restWeb2, $ URLinicial) $$ Enter last result: = json: parse ((doc ($ URLFinal) ) Return & lt; div & gt; {$ Final Result} & lt; / div & gt;};  

As you can see, json: parse (( The doc ($ URLFinal)) is the function that I try to parse the json file in the XML file, but it is impossible to execute because I can not import the module from this page: www.zorba-xquery .com / zorba / json-functions

Let me know if you know some function to solve it, problem or you need more information.

Thanks in advance

David

The correct module is imported :

Import module name space json = "http://www.zorba-xquery.com/modules/json";

Please check in Zorba Jason Documents:

On the 28msec website, you can find an example of a web application written in XQuery which is using these functions: http: / /www.28msec.com/support_templates_json_jsonml/index


Comments