Beispiel #1
0
        public override JObject ToJSON(Boolean Embedded = false)

        => JSONObject.Create(

            !Embedded
                       ? new JProperty("@context", JSONLDContext.ToString())
                       : null,

            new JProperty("groupName", GroupName),

            ChatId.HasValue
                       ? new JProperty("chatId", ChatId.Value)
                       : null,

            SharedSecret.IsNotNullOrEmpty()
                       ? new JProperty("sharedSecret", SharedSecret)
                       : null,

            TextTemplate.IsNotNullOrEmpty()
                       ? new JProperty("textTemplate", TextTemplate)
                       : null,

            NotificationMessageTypes.SafeAny()
                       ? new JProperty("messageTypes", new JArray(NotificationMessageTypes.Select(msgType => msgType.ToString())))
                       : null,

            Description.IsNotNullOrEmpty()
                       ? new JProperty("description", Description)
                       : null

            );