/// <summary>
        /// Return a XML representation of this object.
        /// </summary>
        /// <param name="XName">The XML name to use.</param>
        public XElement ToXML(XName XName = null)

        => new XElement(XName ?? OICPNS.CommonTypes + "RFIDIdentification",

                        new XElement(OICPNS.CommonTypes + "UID", UID.ToString()),

                        EVCOId.HasValue
                       ? new XElement(OICPNS.CommonTypes + "EvcoID", EVCOId.ToString())
                       : null,

                        new XElement(OICPNS.CommonTypes + "RFIDType", RFIDType.ToString()),

                        PrintedNumber.IsNeitherNullNorEmpty()
                       ? new XElement(OICPNS.CommonTypes + "PrintedNumber", PrintedNumber)
                       : null,

                        ExpiryDate.HasValue
                       ? new XElement(OICPNS.CommonTypes + "ExpiryDate", ExpiryDate.ToString())
                       : null

                        );
        /// <summary>
        /// Return a JSON representation of this object.
        /// </summary>
        /// <param name="CustomRFIDIdentificationSerializer">A delegate to serialize custom RFID identification JSON objects.</param>
        public JObject ToJSON(CustomJObjectSerializerDelegate <RFIDIdentification> CustomRFIDIdentificationSerializer = null)
        {
            var JSON = JSONObject.Create(

                new JProperty("UID", UID.ToString()),

                EVCOId.HasValue
                               ? new JProperty("EvcoID", EVCOId.ToString())
                               : null,

                new JProperty("RFIDType", RFIDType.ToString()),

                PrintedNumber.IsNeitherNullNorEmpty()
                               ? new JProperty("PrintedNumber", PrintedNumber)
                               : null,

                ExpiryDate.HasValue
                               ? new JProperty("ExpiryDate", ExpiryDate.ToString())
                               : null);

            return(CustomRFIDIdentificationSerializer != null
                       ? CustomRFIDIdentificationSerializer(this, JSON)
                       : JSON);
        }