Step 2 Including JavaScript Files

Feedback


Copy json_parse.js and toJSON.js from %SuperMap iServer_HOME%/samples/code/UseRESTAPI/HelloREST to the directory holding HelloREST.html.

Add reference to json_parse.js and toJSON.js in the <HEAD/> tag:

<HEAD>

  <TITLE>Hello REST! </TITLE>

  <script  type="text/javascript" src="json_parse.js"></script>

  <script  type="text/javascript" src="toJSON.js"></script>

</HEAD>

json_parse.js contains the json_parse method  used to parse the JSON object into javascript Object.  toJSON.js contains the toJSON method used to convert Object into the JSON string.

See Also