Unlock instant, AI-driven research and patent intelligence for your innovation.

Method and device for quickly converting JSON into JavaBean

A fast, function conversion technology, applied in the direction of program code conversion, code compilation, etc., can solve the problems of JSON to JavaBean performance degradation, poor Setter method performance, etc., to achieve the effect of reliable design principle, wide application prospects, and outstanding substantive characteristics.

Active Publication Date: 2020-10-02
SUZHOU LANGCHAO INTELLIGENT TECH CO LTD
View PDF3 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] Aiming at the poor performance of using the Java reflection mechanism to call the Setter method, compared with directly calling the Setter method, it may even be several tens of times slower, which leads to the problem that the performance of converting JSON to JavaBean is reduced. The present invention provides a method for quickly converting JSON into JavaBean method, device

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and device for quickly converting JSON into JavaBean
  • Method and device for quickly converting JSON into JavaBean
  • Method and device for quickly converting JSON into JavaBean

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0056] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described The embodiments are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts shall fall within the protection scope of the present invention.

[0057] Such as figure 1 As shown, the embodiment of the present invention provides a kind of method that realizes that JSON is quickly converted into JavaBean, writes and processes the program and does preprocessing before program compiling and packaging, automatically generates JSON conversion function for each JavaBean, and JSON is qu...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides a method and device for quickly converting JSON into JavaBean, and the method comprises the steps: carrying out the preprocessing of a writing and processing program before thecompiling and packaging of a program, automatically generating a JSON conversion function for each JavaBean, and enabling the JSON to be quickly converted into the JavaBean; the method specifically comprises building a JsonUtils type code file newly; reading a class name corresponding to each JavaBean according to the configuration file; traversing each JavaBean class name, and generating a code of a JSON conversion function for each JavaBean; and adding the code of the JSON conversion function to a newly built JsonUtils type code file, so that the JSON conversion function is used as a memberfunction of the JsonUtils type.

Description

technical field [0001] The invention relates to the technical field of memory-saving storage management software caching data, in particular to a method and a device for quickly converting JSON into JavaBean. Background technique [0002] The rapid development of the Internet in today's society makes WEB applications very extensive, involving all aspects of our lives. According to incomplete statistics, 80% of WEB applications use JSON as the interactive data between front-end and back-end Java. [0003] The current method of converting JSON to JavaBean is generally to find the corresponding Setter method based on each field name of the JSON object, and use the Java reflection mechanism to call the corresponding Setter method to achieve the purpose of assigning a value to the JavaBean field. [0004] However, the performance of using the Java reflection mechanism to call the Setter method is poor, and it may even be dozens of times slower than calling the Setter method direc...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F8/41
CPCG06F8/41
Inventor 高瑞胜
Owner SUZHOU LANGCHAO INTELLIGENT TECH CO LTD