JSON text comparison method and apparatus

A text and comparison technology, applied in the computer field, can solve the problems that cannot be ignored and cannot be compared in a personalized way, and achieve the effect of improving efficiency and accuracy

Active Publication Date: 2018-11-02
BEIJING JINGDONG SHANGKE INFORMATION TECH CO LTD +1
View PDF5 Cites 12 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0008] 2. Unable to make some personalized comparisons
For example, there is no way to ignore Name / Value that does not need to be compared

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
  • JSON text comparison method and apparatus
  • JSON text comparison method and apparatus
  • JSON text comparison method and apparatus

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0038] Exemplary embodiments of the present invention are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present invention to facilitate understanding, and they should be regarded as exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.

[0039] In the present invention, the JSON text is mainly compared, and the JSON text is briefly introduced below. JSON (JavaScript Object Notation) is a lightweight data exchange format, which has become a more commonly used data exchange format, and can be used for network transmission data format, data storage format, etc.

[0040] JSON is built on four basic types (pri...

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 JSON text comparison method and apparatus. Two unordered JSON texts and unordered arrays in JSON can be compared, and a user can self-define attributes which do not need to becompared according to different demands, so that the comparison accuracy is improved and the comparison efficiency is improved to a certain extent. The JSON text comparison method comprises the stepsof storing configuration information of the to-be-compared JSON texts, wherein the configuration information is used for setting the attributes which do not need to be compared in the compared texts;analyzing the to-be-compared JSON texts, and converting the texts in JSON formats into texts adopting multi-way tree structures; converting the texts adopting the multi-way tree structures into textsadopting key value pair structures; and in combination with the configuration information, comparing the texts adopting the key value pair structures to obtain a comparison result.

Description

technical field [0001] The invention relates to the field of computer technology, in particular to a comparison method and device for JSON text. Background technique [0002] JSON (JavaScript Object Notation) is a lightweight data exchange format. It has now become a more popular data exchange format, which can be used for network transmission data format, data storage format and so on. With its popularity, there are more and more demands around it, such as: comparing two JSON texts for differences. [0003] In the prior art, there are many text comparison tools, such as Beyond Compare, Changes, Diff, and some online comparison tools. In the technical solution of the prior art, for the comparison of JSON text, it is divided into two cases: text parsing and non-parsing: [0004] 1. Do not parse JSON text: read JSON text line by line, compare text by line, and mark or output different lines with certain symbols. [0005] 2. Parse the JSON text: compare the name and value o...

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): G06F17/30
Inventor 邱龙詹平平
Owner BEIJING JINGDONG SHANGKE INFORMATION 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