I need make a request to a server of an open API. The rule of the open API asked json parameter must make keys as a special order(not the A-Z order nor Z-A order).
struct Req : Encodable {
let SourceText: String
let Target: String
let Source: String
let ProjectId: Int = 0
}
What I want is:
{"SourceText":"你好","Source":"zh","Target":"en","ProjectId":0}
But the encoded json is:
{"ProjectId":0,"Source":"zh","SourceText":"你好","Target":"en"}