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
try running json_encode on an object: unless it implements JsonSerializable, you will get only public properties.
And when implementing JsonSerializable, you can only have 1 way to serialize an object, while the JMS serializer can have different rules (including some fields only in some cases for instance), and will also avoid redefining the same stuff everywhere (converting DateTime instances for instance).
note that the native json_encode is actually used by the serializer as well to build the JSON itself. However, it transforms the object graph to an array graph first.
Sounds good. It seems that this library doesn't ask for any XML extensions. I guess the serializing to XML does not require extensions? Should it ask for it in case it's faster to use a C extension?
What would be the advantages of using serializer for JSON serialising vs using the native
json_encode
?The text was updated successfully, but these errors were encountered: