Tag:json

  • Using C + + to transfer pictures with socket in the form of JSON

    Time:2021-5-12

    This example for you to share the C + + implementation of JSON form of socket transmission image specific code, for your reference, the specific content is as follows General process: the client reads the image, encodes it with Base64, converts it into a string, saves it in JSON, transmits it to the server through […]

  • The method of exporting data to XML and JSON in SQL Server

    Time:2021-5-9

    Sometimes it is necessary to export the data in SQL server to other departments at one time for correlation or analysis. Of course, this requirement is very simple for SSIS, but it is a big deal to establish a SSIS package just by exporting the data at one time. There are many bugs in the […]

  • Case study of Ajax using JSON data format

    Time:2021-5-4

    1: JSON (JavaScript object notation) is a simple data format, lighter than XML. JSON is a native JavaScript format, which means that you don’t need any special API or toolkit to process JSON data in JavaScript.The rule of JSON is simple: an object is an unordered collection of ‘name / value’ pairs. An object starts […]

  • Spring MVC JSON type conversion error solution

    Time:2021-5-3

    This article mainly introduces the spring MVC JSON type conversion error solution, the article through the example code is very detailed, for everyone’s study or work has a certain reference learning value, need friends can refer to When using spring MVC to do JSON data, when it returns, it will prompt type conversion error As […]

  • The solution that action in struts 2 can’t return JSON after implementing modelDriven

    Time:2021-4-13

    Copy codeThe code is as follows: public class DeviceAction extends AbstractAction implements ModelDriven<Device> {    private static Log log = LogFactory.getLog(DeviceAction.class);Private device device = new device(); / / can only JSON model driven beansPrivate string result; / / unable to return the JSON value of result         public String getResult(){        return result;    }    public void […]

  • Detailed explanation of Objective-C JSON example

    Time:2021-3-30

    Detailed explanation of Objective-C JSON example By using nsjsonserialization, the mutual conversion between JSON and foundation can be realized. The following describes the use of Objective-C JSON. Json To Fundation Using jsonobjectwithdata, you can convert JSON to foundation. The top level of JSON can be {} or [], so it can have two formats: nsdictionary […]

  • JSP ExtJS.Ajax The implementation process of JSON data transferred by foreground

    Time:2021-3-29

    Copy codeThe code is as follows: <%@ page language=”java” contentType=”text/html; charset=UTF-8″ pageEncoding=”UTF-8″%> <%@ page import=”java.io.BufferedReader” %> <%@ page import=”net.sf.json.*” %> <% BufferedReader in=request.getReader(); StringBuffer jsonStr=new StringBuffer(); String str=””; while((str=in.readLine())!=null){ jsonStr.append(str); } JSONObject jsonObj= JSONObject.fromObject(jsonStr.toString()); String name= jsonObj.getString(“userName”); String pwd= jsonObj.getString(“passWord”); String msg=””; if(name.equals(“Tom”)){ MSG = login successful;}else { MSG = login failed;} response.getWriter().write(msg); %> The […]

  • Ajax + JSON + Struts2 implementation of list transfer examples

    Time:2021-3-24

    Due to the need of internship, we need to get the values in the background list collection through Ajax. Since I haven’t touched it before, I will study it today.1、 First, you need to download the jar package that JSON depends on. It mainly depends on the following: json-lib-2.2.2-jdk15 ezmorph-1.0.4 commons-logging-1.0.4 commons-lang-2.4 commons-collections-3.2.1 commons-beanutils 2、 […]

  • Introduction of JSP pagination by JSON (with effect picture)

    Time:2021-3-9

    JSON has been introduced in detail in the last article. It is easy to understand and transmit quickly. And it can be well integrated with JavaScript.Without the need to add jars, JSP paging can be well completed.The following is an example of pagination: The effect is shown in the figure, using jsp + Servlet TechnologyFirst: write […]

  • Implementation method of storing and reading JSON data in local storage of HTML5

    Time:2021-1-27

    Localstorage is a method of local storage provided by HTML5, but the localstorage method can only store string data. Sometimes we need to store objects locally, such as JSON. How can localstorage store and read JSON data? Idea: since localstorage can only store string data, we can first convert the JSON object into a string, […]

  • Implementation code of go JSON data forwarding

    Time:2021-1-16

    case For example, there is a get interface that can get user information in batches > curl ‘http://localhost:8080/user/1,2,3’ [ { “user_id”:1, “other_suff”:… }, { “user_id”:2, “other_suff”:… }, { “user_id”:3, “other_suff”:… } ] At the same time, we need to put the user information and some of their order information together to form a new interface […]

  • Detailed explanation of encoding and decoding of JSON data in PHP

    Time:2020-12-24

    This paper describes the implementation of PHP JSON data encoding and decoding operations. The details are as follows: Usage scenarios of JSON: A data table field needs to record multiple information, such as other information about users Data transmission, such as: return value of API interface, asynchronous loading in AJAX Configuration files, such as composer.json […]