/// <summary>
        /// Configure the media type tables so that Json Light is the first JSON format in the table.
        /// </summary>
        /// <remarks>
        /// This is only used in V4 and beyond.
        /// </remarks>
        private void AddJsonLightMediaTypes()
        {
            var optionalParameters = new[]
            {
                new
                {
                    ParameterName = MimeConstants.MimeMetadataParameterName,
                    Values        = new[] { MimeConstants.MimeMetadataParameterValueMinimal, MimeConstants.MimeMetadataParameterValueFull, MimeConstants.MimeMetadataParameterValueNone }
                },
                new
                {
                    ParameterName = MimeConstants.MimeStreamingParameterName,
                    Values        = new[] { MimeConstants.MimeParameterValueTrue, MimeConstants.MimeParameterValueFalse }
                },
                new
                {
                    ParameterName = MimeConstants.MimeIeee754CompatibleParameterName,
                    Values        = new[] { MimeConstants.MimeParameterValueFalse, MimeConstants.MimeParameterValueTrue }
                },
            };

            // initial seed for the list will be extended in breadth-first passes over the optional parameters
            var mediaTypesToAdd = new LinkedList <MediaType>();

            mediaTypesToAdd.AddFirst(ApplicationJsonMediaType);

            foreach (var optionalParameter in optionalParameters)
            {
                // go through each one so far and extend it
                for (LinkedListNode <MediaType> currentNode = mediaTypesToAdd.First; currentNode != null; currentNode = currentNode.Next)
                {
                    MediaType typeToExtend = currentNode.Value;
                    foreach (string valueToAdd in optionalParameter.Values)
                    {
                        var extendedParameters = new List <KeyValuePair <string, string> >(typeToExtend.Parameters ?? Enumerable.Empty <KeyValuePair <string, string> >())
                        {
                            new KeyValuePair <string, string>(optionalParameter.ParameterName, valueToAdd)
                        };

                        var extendedMediaType = new MediaType(typeToExtend.TypeName, typeToExtend.SubTypeName, extendedParameters);

                        // always match more specific things first
                        mediaTypesToAdd.AddBefore(currentNode, extendedMediaType);
                    }
                }
            }

            List <MediaTypeWithFormat> JsonMediaTypeWithFormatList = new List <MediaTypeWithFormat>();
            MediaTypeWithFormat        applicationJson             = null;

            foreach (MediaType mediaType in mediaTypesToAdd)
            {
                var mediaTypeWithFormat = new MediaTypeWithFormat {
                    Format = ODataFormat.Json, MediaType = mediaType
                };
                if (mediaType == ApplicationJsonMediaType)
                {
                    applicationJson = mediaTypeWithFormat;
                }
                else
                {
                    JsonMediaTypeWithFormatList.Insert(0, mediaTypeWithFormat);
                }
            }

            if (applicationJson != null)
            {
                JsonMediaTypeWithFormatList.Insert(0, applicationJson);
            }

            this.AddForJsonPayloadKinds(JsonMediaTypeWithFormatList);
        }