Method and system for converting JSON data into model data

A model data and JSON technology, applied in the field of data analysis, can solve the problems of inability to meet the high performance of the terminal, low efficiency of model data transfer, poor user experience, etc., to achieve the effect of satisfying high performance, improving operating efficiency and good performance

Active Publication Date: 2015-12-16
SHENZHEN LAN YOU TECH
View PDF3 Cites 14 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] From the above analysis, it can be seen that the above two methods are time-consuming, and the efficiency of transferring model data is low; they cannot meet the high-performance requirements of the terminal, and the user experience is poor

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 system for converting JSON data into model data
  • Method and system for converting JSON data into model data
  • Method and system for converting JSON data into model data

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0032] In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.

[0033] Such as image 3 Shown is a flow chart of an embodiment of the method for converting JSON data into model data in the present invention. The method includes the following steps:

[0034] S1. Serialize JSON data into data of dictionary or array type;

[0035] Among them, serialization (Serialization) is the process of converting the object state into a format that can be maintained or transmitted.

[0036] S2. Use the runtime mechanism to loop through the data of the dictionary or array type to obtain the first address of its memory;

[0037] Among them, the runtime mechanism is the lower...

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 for converting JSON data into model data. The method comprises the following steps of: S1, serializing the JSON data into data of a dictionary or array type; S2, circularly traversing the data of the dictionary or array type by using a runtime mechanism, and obtaining a head address of a memory; S3, dynamically setting an SEL method according to the head address to position an object; S4, dynamically sending a message to the object by using a message mechanism, and obtaining an attribute value of the object; and S5, generating the model data according to the attribute value. The invention further provides a corresponding system. By implementing the method and the system, the JSON data can be quickly and efficiently converted into the model data, so that the operational efficiency is improved. At the same time, attributes and methods in classes and objects are dynamically modified in a program running process. In addition, the runtime mechanism is adopted, so that program performance is better, high-performance requirements of a terminal can be met, and user experience is relatively good.

Description

technical field [0001] The present invention relates to the technical field of data analysis, and more specifically, relates to a method and system for converting JSON data into model data. Background technique [0002] JSON (JavaScriptObjectNotation) is a lightweight data exchange format that is easy for people to read and write, easy for machines to parse and generate, and can be used as a data exchange format; at the same time, JSON is a subset of the JavaScript specification, using a completely independent The text format of the language, and also uses a convention similar to the C language. Therefore, JSON is suitable for server interaction with JavaScript. [0003] When developing mobile applications, the data returned by the server to the client is generally in JSON format. As a front-end developer, when you receive a JSON string, you need to convert it into custom model data for reuse, such as figure 1 As shown, when the JSON data returned by the server is relativ...

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
CPCG06F16/258
Inventor 张健
Owner SHENZHEN LAN YOU TECH
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