convert dictionary to json serialization swift 4

JavaScript
["A":123, "B":455]
Source

Also in JavaScript: