Decode issue
I'm Sending the finalized JWT String in Header and expected to get a response as same
but it is changing the decode response

This is the cryptogram after encoding
eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzUxMiJ9.eyJhbW91bnQiOiIxLjAwIiwiZGV2aWNlSWQiOiJGRjY0QUUwOS02NkVDLTQ3QTMtODkwQy01MkE0RjE1MzFEOTEiLCJjcmVkaXRvckFjY291bnQiOiIyNTUyNTI1MjIiLCJlbmRUb0VuZElkIjoiQ01DTE1VTTAyMDIyMDEyMDAwMDAwMSIsImRlYnRvckFjY291bnQiOiIxMjM0NTY3OCIsImN1cnJlbmN5IjoiTVVSIiwiY29uc2VudElkIjoiODgzNzkifQ.GiIAaPBxa-Rsf6AjYWDVPpfvlqpau_qkADGHixskS2knONHDQv8wK1MleCcr4MViRcSCoSFl195BhqI9Pp4yE31OFd_O59O7FSDY1jt7ZIfkdZa9YHxz9QMgq-rk3f7S4m_REThgrTEVo9DsbTWNuuhE2XuJtKbovFxTFF_4_zftXWfoQ9bufW9BbLeUWwzLrUPrTKrPpon6DEy5nV0Sy-dufCJKt9X3-79La-2xgqPSjtybrQMlGg78gaVQF7tjya6dTrPMQ8j-TIyeaRdRQIsJm8xOl99wOEP7wA6JwxSqQsjeUTXRHPIikixcPTs8oybEbCh5qCZULz-LnOXYJw
if i see this decoding cryptogram in JWT, it is changing the json response
@dannys42 @bluk @e0 @mbarnach any response on the decoded object ??
@phanindhraB What is different? I cannot spot the difference here. Do you mean your JWT is altered in anyways? But between what and what?
@mbarnach I mean, passing Claim struct object with an order for creating encoding object, if I decode the object using JWT, the order of the Claim struct object is changing. you can see the above comment.
@phanindhraB JSON are coded as dictionary, so order is not preserved. If you are using a decodable struct, it shouldn't matter. Otherwise, you will have to provide your own encoder/decoder with ordered dictionary.
I am running into a similar issue. I've created my own encoding/decoding function in the Claims struct I made. I am getting a value not found.