json_encode encodes public properties of an object only, encoding an object is often a mistake so better to catch it
in the future, if needed, we can support encode of objects implementing JsonSerializable interface, but as JsExpression does not implement such interface, it was never supported by atk4/ui, thus also I do not expect any BC break from this PR
json_encode
encodes public properties of an object only, encoding an object is often a mistake so better to catch itin the future, if needed, we can support encode of objects implementing
JsonSerializable
interface, but asJsExpression
does not implement such interface, it was never supported by atk4/ui, thus also I do not expect any BC break from this PR