Added serialize to JSON