As a lightweight data exchange format, json occupies a very important position in front-end and back-end data exchange. Json syntax is very simple and uses the key-value pair representation. This article introduces how JQuery transfers and parses data in Json format under SpringMVC framework, if you are interested in springmvcajaxjson, learn about it. as a lightweight data exchange format, json occupies a very important position in front-end and back-end data exchange. Json syntax is very simple, using the key-value pair representation form. JSON can convert a set of data in a JavaScript object to a string, and then it can be easily transferred between functions, in an asynchronous application, you can also transmit a string in json format to the front end and explain it to the front end. This string conforms to the json syntax, while the json syntax is a subset of the javascript syntax, so javascript can easily interpret it, and JSON can represent a more complex structure than "name/value pairs. The following example shows how JQuery transfers/parses data in json format.
1. First, let's look at the front-end jsp code:
<% @ Page language = "java" contentType = "text/html; charset = UTF-8" pageEncoding = "UTF-8" %>