private ODataServiceDocument ReadServiceDocument(string payload) { MemoryStream stream = new MemoryStream(Encoding.UTF8.GetBytes(payload)); ODataJsonLightServiceDocumentDeserializer deserializer = CreateODataJsonServiceDocumentDeserializer(stream); return(deserializer.ReadServiceDocument()); }
private ODataServiceDocument ReadServiceDocument(string payload) { ODataServiceDocument serviceDocument; using (var jsonInputContext = CreateJsonLightInputContext(payload, isAsync: false)) { var jsonLightServiceDocumentDeserializer = new ODataJsonLightServiceDocumentDeserializer(jsonInputContext); serviceDocument = jsonLightServiceDocumentDeserializer.ReadServiceDocument(); } return(serviceDocument); }