Closed jaumebecks closed 3 years ago
Currency
JSON serialization should return an indexed array, as it should be treated as an object in JSON.
I don't think that's necessarily true. The format is arbitrary, nothing says the currency has to be an object. Additionally, this is a breaking change.
@sagikazarmark It's true that it is a breaking change, and that shouldn't be an impediment to try to improve the code.
And following the current Entity structure, the default Object formatting should respect the JSON serialization. Money::$currency is a Currency
object, and should be reflected as so in JSON, otherwise serialization/deserialization need special serializers/deserializers to manipulate the data. Another thing is that it's intended to apply such change
Unnecessary breaking change. Closing.
Currency
JSON serialization should return an indexed array, as it should be treated as an object in JSON. Therefore, when serializing a Money object, the result should be likeInstead of