Implementation method for filtering fields in interface JSON message
A JSON and filtering interface technology, applied in the field of network communication, can solve the problems of large quantity, high maintenance cost of later codes, and large variability of related field information, so as to achieve high maintenance costs and improve work efficiency
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0042] A method for implementing fields in an interface JSON message, comprising the following steps:
[0043] Step 1. Convert the request message object to JSONObject format:
example 1
[0045] The converted json format message is as follows:
[0046]
[0047]
[0048] Step 2. Obtain the configuration of "filter field parameters" in the database and store it in the "parameter list map1" object. The parameter configuration format is as follows:
[0049] a. The first-level parameter name of the json message is fixed:
[0050] Json_"Whether the field content can be transmitted (true / false)"_"first"_"Number of parameters (because there are too many fields, you need to configure more than one)": fields (separated by commas).
[0051] b. Sub-level parameter configuration of json message:
[0052] Json_"Whether the field content is transferable (true / false)"_"Field name with children"_"Number of parameters": fields (separated by commas).
example 2
[0054] ①key="Json_true_first_1", value="code, message, data";
[0055] ②key="Json_true_data_1", value="code, paraml";
[0056] ③key="Json_false_param1_1", value="score";
[0057] ④key="Json_false_param1_2", value="reg".
[0058] Among them, such as the message in Example 1:
[0059] "code": 200, "message": "success",
[0060] "data":
[0061] It is the first level of the json message, and the parameter name is fixed as "Json_true_first_1".
[0062] As configured in ①, all fields will not be filtered;
[0063] "code": "SUCCESS", "errorMessage": "Call succeeded";
[0064] "param1": ";
[0065] "param2":" is the second level of the json message, that is, the child of the first level field data, and the parameter name is "Json_true_data_1".
[0066] As configured in ②, the fields to be filtered are errorMessage and param2, that is, the values of the fields errorMessage and param2 are assigned to empty strings;
[0067] "score": "123", "loan": "asd", "reg": "123", "user": ...
PUM

Abstract
Description
Claims
Application Information

- R&D
- Intellectual Property
- Life Sciences
- Materials
- Tech Scout
- Unparalleled Data Quality
- Higher Quality Content
- 60% Fewer Hallucinations
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2025 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com