PutASync returning ''{' is invalid after a value. Expected either ',', '}', or ']' #2487
Labels
status:waiting-for-triage
An issue that is yet to be reviewed or assigned
type:bug
A broken experience
Describe the bug
I have been following this graph connector tutorial and have modified slightly to accommodate a list of helpdesk (fresh service) Articles.
When I have created a connection, registered the schema and attempted to push data from a test csv up I am getting the below error
System.Text.Json.JsonReaderException HResult=0x80131500 Message='{' is invalid after a value. Expected either ',', '}', or ']'. LineNumber: 0 | BytePositionInLine: 232. Source=System.Text.Json StackTrace: at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan
1 bytes)at System.Text.Json.Utf8JsonReader.ConsumeNextToken(Byte marker)
at System.Text.Json.Utf8JsonReader.ReadSingleSegment()
at System.Text.Json.Utf8JsonReader.Read()
at System.Text.Json.JsonDocument.Parse(ReadOnlySpan
1 utf8JsonSpan, JsonReaderOptions readerOptions, MetadataDb& database, StackRowStack& stack) at System.Text.Json.JsonDocument.Parse(ReadOnlyMemory
1 utf8Json, JsonReaderOptions readerOptions, Byte[] extraRentedArrayPoolBytes, PooledByteBufferWriter extraPooledByteBufferWriter)at System.Text.Json.JsonDocument.Parse(Stream utf8Json, JsonDocumentOptions options)
at Microsoft.Kiota.Serialization.Json.JsonParseNodeFactory.GetRootParseNode(String contentType, Stream content)
at Microsoft.Kiota.Abstractions.Serialization.ParseNodeProxyFactory.GetRootParseNode(String contentType, Stream content)
at Microsoft.Kiota.Abstractions.Serialization.ParseNodeFactoryRegistry.GetRootParseNode(String contentType, Stream content)
at Microsoft.Kiota.Http.HttpClientLibrary.HttpClientRequestAdapter.d__30.MoveNext()
at Microsoft.Kiota.Http.HttpClientLibrary.HttpClientRequestAdapter.d__20
1.MoveNext() at Microsoft.Kiota.Http.HttpClientLibrary.HttpClientRequestAdapter.<SendAsync>d__20
1.MoveNext()at Microsoft.Graph.External.Connections.Item.Items.Item.ExternalItemItemRequestBuilder.d__8.MoveNext()
at FreshServiceConnector.Graph.GraphHelper.d__9.MoveNext() in Z:_github\FreshServiceConnector\Graph\GraphHelper.cs:line 143
This exception was originally thrown at this call stack:
System.Text.Json.ThrowHelper.ThrowJsonReaderException(ref System.Text.Json.Utf8JsonReader, System.Text.Json.ExceptionResource, byte, System.ReadOnlySpan)
System.Text.Json.Utf8JsonReader.ConsumeNextToken(byte)
System.Text.Json.Utf8JsonReader.ReadSingleSegment()
System.Text.Json.Utf8JsonReader.Read()
System.Text.Json.JsonDocument.Parse(System.ReadOnlySpan, System.Text.Json.JsonReaderOptions, ref System.Text.Json.JsonDocument.MetadataDb, ref System.Text.Json.JsonDocument.StackRowStack)
System.Text.Json.JsonDocument.Parse(System.ReadOnlyMemory, System.Text.Json.JsonReaderOptions, byte[], System.Text.Json.PooledByteBufferWriter)
System.Text.Json.JsonDocument.Parse(System.IO.Stream, System.Text.Json.JsonDocumentOptions)
Microsoft.Kiota.Serialization.Json.JsonParseNodeFactory.GetRootParseNode(string, System.IO.Stream)
Microsoft.Kiota.Abstractions.Serialization.ParseNodeProxyFactory.GetRootParseNode(string, System.IO.Stream)
Microsoft.Kiota.Abstractions.Serialization.ParseNodeFactoryRegistry.GetRootParseNode(string, System.IO.Stream)
...
[Call Stack Truncated]`
Expected behavior
I expected any unspecified class attributes (potentially the OdataType property of ExternalItem) to be serialised as nulls or empty strings but it appears like it's perhaps not and leaving a hole in the json to make it invalid. That's my read on it anyway but as you can tell by the fact I'm following a tutorial I'm not the most experienced developer.
How to reproduce
There's not really a very easy way to provide the code for this sorry.
Any help much appreciated! Thanks so much
The text was updated successfully, but these errors were encountered: