Home > other >  Inquire, receives the error is the json format, how to get the value?
Inquire, receives the error is the json format, how to get the value?

Time:09-30

{code: 10001 message: "Internal server error"}

The error like this format, how to get the code value, to determine the next step

CodePudding user response:

Type S stuct {
Code int ` json: "the Code" `
The Message string ` json: "" `
}

Var s s

Json. Unmashal (bb, & amp; s)
  • Related