private ODataServiceDocument ReadServiceDocument(string payload)
        {
            MemoryStream stream = new MemoryStream(Encoding.UTF8.GetBytes(payload));
            ODataJsonLightServiceDocumentDeserializer deserializer = CreateODataJsonServiceDocumentDeserializer(stream);

            return(deserializer.ReadServiceDocument());
        }
Ejemplo n.º 2
0
        private ODataServiceDocument ReadServiceDocument(string payload)
        {
            ODataServiceDocument serviceDocument;

            using (var jsonInputContext = CreateJsonLightInputContext(payload, isAsync: false))
            {
                var jsonLightServiceDocumentDeserializer = new ODataJsonLightServiceDocumentDeserializer(jsonInputContext);

                serviceDocument = jsonLightServiceDocumentDeserializer.ReadServiceDocument();
            }

            return(serviceDocument);
        }