The postman parameter is a Json data structure

Operation instructions when the main postman field in this article is a Json structure
This article takes order delivery as an example, and designs according to the interface document
User order interface fields are shown in the figure:
There are two ways to pass field Json data:
The following figure shows the interface field rules:

 

  1. The interface is the post request method, and the input json data structure is directly input in the form-data in the Body in postman

 

2. In the body, enter the JSON data structure in raw, but I did not call this method successfully (it may be that our structure definition and writing are a little different, follow-up ask for development, to be studied)

  •   First, in the headers, set the Content-Type to applicationon/json, as shown in the figure:
    •  


       

  • Then in the body, select raw and write the json data structure, as shown in the figure
    •  


       

  • In Json, the writing method and data nesting of multiple data structures are shown in the figure:

 

 

3. We can use json to translate the JSON data we have written. The link address is: http://json.cn/

 

Looking at the pictures, we can see that the json statement just written is no problem, but the data after the request is incorrect. This problem is set aside for the follow-up research, and everyone is welcome to solve it! 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326488696&siteId=291194637