Deserialization method and device

A technology of deserialization and data content, applied in the field of data processing, can solve the problems of data precision change, Java object data precision cannot meet actual needs, etc., and achieve the effect of improving accuracy

Inactive Publication Date: 2019-03-29
BEIJING GRIDSUM TECH CO LTD
View PDF3 Cites 6 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] In the process of implementing the above invention, the inventor found that in the process of deserializing a JSON string into a Java object in the prior art, among the multiple fields contained in the JSON string, there are at least two fields corresponding to the data content When the original data type is a numerical type, it is necessary to determine the data content with the highest data precision among multiple data contents, and then deserialize all the data contents whose original data type is a numerical type in this JSON string according to the numerical type corresponding to this data content Therefore, deserializing a JSON string into a Java object through the existing technology will cause the deserialized Java object to The data accuracy often cannot meet the actual needs

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
  • Deserialization method and device
  • Deserialization method and device
  • Deserialization method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0054] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided for more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0055] The embodiment of the present invention provides a deserialization method, such as figure 1 As shown, after parsing the received JSON string, the method determines the original data type of the data content corresponding to each field contained in the JSON string according to the parsing result, and performs each The deserialization operation is performed on each data content, the JSON string is converted into a Java object,...

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 discloses a deserialization method and device, and relates to the technical field of data processing, which can solve the problem that in the process of deserializing a JSON string intoa Java object, when the data content of the original data type being numberical type in the JSON string is deserialized according to the numeric type of the data content with the highest data precision, the data precision of some data content in the obtained deserialized Java object changes in the prior art. The method of the invention comprises the following steps of: receiving a JSON string; parsing the JSON string to obtain the parsing result; determining an original data type of a data content corresponding to each field name, and judging whether the data content contains at least two datacontents of which the original data type is a numerical type; If so, the JSON string is converted to a Java object according to the original data type corresponding to each data content. The invention is suitable for application in the process of deserializing a JSON string into a Java object.

Description

technical field [0001] The invention relates to the technical field of data processing, in particular to a deserialization method and device. Background technique [0002] With the increasing development of Internet technology, information interaction between different application systems has become more frequent. Since different programming languages ​​are used in the development of different application systems, when information is exchanged between different application systems, it is necessary to convert the object to be transmitted into a common data format before data transmission. Since the JSON (JavaScript Object Notation, JavaScript Object Notation) structure is a lightweight data exchange format completely independent of the programming language, there are great advantages in using the JSON structure as the transmission carrier for data transmission between different application systems. [0003] At present, in the process of information interaction between two di...

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
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/448G06F9/54
CPCG06F9/546G06F2209/547
Inventor 朱龙斌
Owner BEIJING GRIDSUM TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products