I'm trying to consume an inbound JSON file I've also tried with code that duplicates it here. The client crashes at the JsonTextReader statement and throws the following error:
Type: System.Runtime.Serialization.SerializationException
Message: <ii>Type 'System.IO.StringReader' with data contract name 'StringReader:schemas.datacontract.org/.../System.IO' is not expected. Consider using a DataContractResolver if you are using DataContractSerializer or add any types not known statically to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding them to the list of known types passed to the serializer.</ii>
ReadString := '{';
ReadString := ReadString.ToString + '"odata.metadata": "nav2018/.../OData$metadata#ScionCostComponents",';
ReadString := ReadString.ToString + '"value": [';
ReadString := ReadString.ToString + '{';
ReadString := ReadString.ToString + '"Code": "TEST",';
ReadString := ReadString.ToString + '"Descripiton": "Test1",';
ReadString := ReadString.ToString + '"Cost_Account_No": "",';
ReadString := ReadString.ToString + '"Cost_Account_Balance": "0",';
ReadString := ReadString.ToString + '"Applied_Account_No": "14200",';
ReadString := ReadString.ToString + '"Applied_Account_Balance": "0",';
ReadString := ReadString.ToString + '"Date_Filter": "0001-01-01T00:00:00"';
ReadString := ReadString.ToString + '}';
ReadString := ReadString.ToString + ']';
ReadString := ReadString.ToString + '}';
StringReader := StringReader.StringReader(String);
*This post is locked for comments