You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to run the Sample.Datasync.Server.SingleContainer sample project using the Azure Cosmos DB Emulator (the Linux vnext-preview version) and if I try and execute any of the http calls such as the:
GET {baseendpoint}/tables/TodoItem
I receive the following json error but I am unsure if I have configured something incorrectly or if this is an issue with the emulator (or I'm missing something obvious of course), has anyone else come across this exception while running the CosmosDB sample?
System.Text.Json.JsonException: The JSON value could not be converted to System.Int32. Path: $[0] | LineNumber: 0 | BytePositionInLine: 2.
---> System.InvalidOperationException: Cannot get the value of a token type 'StartObject' as a number.
If I override the QueryAsync method on the TableController I am able to get around the error by directly using the Repository and avoiding the call to the CountAsync method on the CosmosTableRepository.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I'm trying to run the Sample.Datasync.Server.SingleContainer sample project using the Azure Cosmos DB Emulator (the Linux vnext-preview version) and if I try and execute any of the http calls such as the:
GET {baseendpoint}/tables/TodoItem
I receive the following json error but I am unsure if I have configured something incorrectly or if this is an issue with the emulator (or I'm missing something obvious of course), has anyone else come across this exception while running the CosmosDB sample?
System.Text.Json.JsonException: The JSON value could not be converted to System.Int32. Path: $[0] | LineNumber: 0 | BytePositionInLine: 2.
---> System.InvalidOperationException: Cannot get the value of a token type 'StartObject' as a number.
If I override the QueryAsync method on the TableController I am able to get around the error by directly using the Repository and avoiding the call to the CountAsync method on the CosmosTableRepository.
Beta Was this translation helpful? Give feedback.
All reactions