Add serialize to JSON Serializer loop handling to prevent crashing for self referencing objects