protected internal override void VisitString(JsonSchemaString constraint)
        {
            if (constraint.MinLength != null)
            {
                writer.WriteNumber(Keys.MinLength, constraint.MinLength.Value);
            }

            if (constraint.MaxLength != null)
            {
                writer.WriteNumber(Keys.MaxLength, constraint.MaxLength.Value);
            }

            if (constraint.Pattern != null)
            {
                writer.WriteString(Keys.Pattern, constraint.Pattern);
            }

            if (constraint.Format != null)
            {
                writer.WriteString(Keys.Format, constraint.Format);
            }

            if (constraint.ContentEncoding != null)
            {
                writer.WriteString(Keys.ContentEncoding, constraint.ContentEncoding);
            }

            base.VisitString(constraint);
        }
        protected internal virtual void VisitString(JsonSchemaString constraint)
        {
            // visit self
            VisitConstraint(constraint);

            // visit children

            var media = constraint.ContentMedia;

            if (media != null)
            {
                VisitStringContentMedia(media.Value);
            }
        }