-
Notifications
You must be signed in to change notification settings - Fork 226
Description
Currently, when calling jsonSerialize() on Braintree\Result\Successful, it returns an empty array. This is because the method simply returns the $_attributes property, which doesn't contain any data for a Successful object.
This wasn't an issue for us previously, since our application's JSON helper would manually generate an array when serializing Successful results for JSON encoding. However, since the implementation of \JsonSerializable in v6.32.0, our application now uses a different code pathway, resulting in an empty array being returned where we need to receive a serialized representation of the Successful result.
Could you clarify whether returning an empty array from Braintree\Result\Successful::jsonSerialize() is the intended behavior? This would help us determine whether to implement our own serialization or if there are plans to add serialization support to the Successful result class.