Working serializeToJson on view-models.