package calfeed import "encoding/json" const Schema = "lectio.calendar/1" // JSON renders days as the stable lectio.calendar/1 envelope. func JSON(form string, days []DayView) ([]byte, error) { if days == nil { days = []DayView{} } return json.MarshalIndent(struct { Schema string `json:"schema"` Form string `json:"form"` Days []DayView `json:"days"` }{Schema, form, days}, "", " ") }