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
The current default implementation of Json.toString will output an ellipsis (...) when the traversal is about to output the same object (same Java reference). This is to avoid circularity issues and because the aim of toString was for display purposes. We might break backward compatibility (and maybe this can be made optional), but this decision is a bit counter-intuitive. One expected toString to at least produce a valid JSON string. Because we set out to support graphs in this API and not just trees, we have to handle circular structures. But we can do this in a separate method, e.g. displayString or some such. Alternatively, we could offer a hook to be provided by the user to deal with serializing the same object, but in a different context.
The text was updated successfully, but these errors were encountered:
The current default implementation of
Json.toString
will output an ellipsis (...
) when the traversal is about to output the same object (same Java reference). This is to avoid circularity issues and because the aim oftoString
was for display purposes. We might break backward compatibility (and maybe this can be made optional), but this decision is a bit counter-intuitive. One expected toString to at least produce a valid JSON string. Because we set out to support graphs in this API and not just trees, we have to handle circular structures. But we can do this in a separate method, e.g.displayString
or some such. Alternatively, we could offer a hook to be provided by the user to deal with serializing the same object, but in a different context.The text was updated successfully, but these errors were encountered: