You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For those working with and writing APIs, the removal of fromJSON and toJSON would be catastrophic. I have even suggest the addition of toXML and fromXML. Do not forget there was a huge push for REST in MODX.
It would certainly be a breaking change which requires deprecating it before removing to make sure people currently using it are notified before it's actualy gone...
... but how is it catastrophic when json_encode and json_decode are equivalent and have been widely supported for like a decade? A basic find and replace could update a codebase in like 30 seconds.
Catastrophic is an overstatement, I admit. From an API developer standpoint having the output data types closest to the raw data is the best -- especially as databases have a native json fieldtype. I will make changes on my two year old xpdo3 applications.
In the MODX deprecations issue there's the question of toJSON and fromJSON utilities, and wether that's still necessary or should be removed.
I'd say deprecating them would be a pretty safe bet these days.
The text was updated successfully, but these errors were encountered: