Home > front end >  For writing a JSON format correct?
For writing a JSON format correct?

Time:10-29

Below is a trill submit JSON, instructions from: https://open.douyin.com/platform/doc/6848798087226329100
Content:
Fa0af {" to_user_id ":" 523-2746-43 bf - bdb5-54 b075eca574 ", "content" : "{" item_id" : '@ 9 vwh3pytvjllmga2y4hoq8783w3hof + BOJRwqwuvKVETaPT/60 zdrmyqig357zebxirpma0xkbcxmkyvtu2iuq=='} ", "message_type" : "video"}

The above, please write correct? Submitted to trill server always tip: {" description ":" illegal "parameters," error_code ": 5}

If changed it to text format, as follows, confirm the submit success:
Fa0af {" to_user_id ":" 523-2746-43 bf - bdb5-54 b075eca574 ", "content" : "{' text ':' @ 9 vwh3pytvjllmga2y4hoq8783w3hof + BOJRwqwuvKVETaPT/60 zdrmyqig357zebxirpma0xkbcxmkyvtu2iuq=='}", "message_type" : "text"}

Now don't understand is wrong or json error, customer trill, always auto reply: https://open.douyin.com/platform/doc/6848798087226329100, speechless,

The following two writing, also all error:
(1) {" to_user_id ":" 523 fa0af - 2746-43 bf - bdb5-54 b075eca574 ", "content" : "{" item_id" : "@ 9 vwh3pytvjllmga2y4hoq8783w3hof + BOJRwqwuvKVETaPT/60 zdrmyqig357zebxirpma0xkbcxmkyvtu2iuq=="} ", "message_type" : "video"}

(2) {" to_user_id ":" 523 fa0af - 2746-43 bf - bdb5-54 b075eca574 ", "content" : {" item_id ":" @ 9 vwh3pytvjllmga2y4hoq8783w3hof + BOJRwqwuvKVETaPT/60 zdrmyqig357zebxirpma0xkbcxmkyvtu2iuq=="}, "message_type" : "video"}


For help,,,,,,,,,,,,,,

CodePudding user response:

(2) is the right
Fa0af {" to_user_id ":" 523-2746-43 bf - bdb5-54 b075eca574 ", "content" : {" item_id ":" @ 9 vwh3pytvjllmga2y4hoq8783w3hof + BOJRwqwuvKVETaPT/60 zdrmyqig357zebxirpma0xkbcxmkyvtu2iuq=="}, "message_type" : "video"}

CodePudding user response:

To determine the website, should be item_id, or text?
Pay attention to the details, should be a key to write wrong

CodePudding user response:

Reply the sky waves: I have said above, (2) the error;

Reply ziqi0716: a key? Here is to find a key, the content above, trouble.
  • Related