Data conversion method and device and storage medium

A conversion method and data technology, applied in the computer field, can solve problems such as data conversion schemes prone to loopholes, and achieve the effect of accurate format conversion

Pending Publication Date: 2022-02-08
光大科技有限公司
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] Embodiments of the present invention provide a data conversion method, device, and storage medium to at least solve the problem that data conversion schemes in the related art are prone to loopholes

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
  • Data conversion method and device and storage medium
  • Data conversion method and device and storage medium
  • Data conversion method and device and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0033] Currently, JSON data has gradually replaced XML as the mainstream data exchange and storage format. In the process of data interaction, the problem of inconsistent data format is often encountered. In the xml era, XSLT can realize it. In the JSON era, in order to convert data read from multiple data sources into a unified standard format in a Java program, there are currently several methods:

[0034] Java entity class mapping: JSON->java input entity class->java output entity class->JSON.

[0035] With XSLT: JSON->XML->XSLT->XML->JSON.

[0036] Write a template (Velocity, FreeMarker, etc.), deserialize the input JSON text into a java entity class, and use the template to render the output as JSON text.

[0037] Several conversion methods of related technologies are either lack of standardization, or the conversion process is cumbersome, prone to problems or loopholes, which affects the robustness of the program and is not conducive to maintenance.

[0038] In view o...

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 embodiment of the invention provides a data conversion method and device and a storage medium. The method comprises the following steps: receiving first JSON data; obtaining a responsibility chain instance used for converting the first JSON data in the original format into second JSON data in the target format, wherein the responsibility chain instance is of a chain structure composed of a plurality of conversion units; and converting the first JSON data in the original format into the second JSON data in the target format through responsibility chain instance. Through the JSON data format conversion method and device, the problem that vulnerabilities are prone to occurring in a data conversion scheme in the related technology is solved, and format conversion of the JSON data is efficiently and accurately completed.

Description

technical field [0001] Embodiments of the present invention relate to the field of computers, and in particular, to a data conversion method, device, and storage medium. Background technique [0002] Currently, JavaScript Object Notation (JavaScript Object Notation, JSON) data has gradually replaced XML as the mainstream data exchange and storage format. In the process of data interaction, the problem of inconsistent data format is often encountered. In the era of Extensible Markup Language (XML), Extensible Stylesheet Language Transformation (XSLT) can be implemented. In the JSON era, in order to convert data read from multiple data sources into a unified standard format in Java programs, programs developed using conversion methods of related technologies either lack standardization or have complicated conversion steps, which are not easy to understand , It is very easy to have loopholes, and it increases the cost of development, testing and maintenance. Contents of the ...

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): G06F16/81G06F16/84
CPCG06F16/81G06F16/84
Inventor朱学锋铁力田江向小佳丁永建李璠
Owner光大科技有限公司