Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

System.Text.Json.JsonException: The input does not contain any JSON tokens

$
0
0

I'm just trying to use a Http POST method in a Blazor app through

public async Task CreateUnit(UnitEntity unit){    await _http.PostJsonAsync<UnitEntity>("api/units", unit);}

_http and myObject have been defined elsewhere, but I'm getting this weird error. Can anyone help? This is the closest thing I could find elsewhere: https://github.com/dotnet/runtime/issues/30945.

The full error message is

System.Text.Json.JsonException: The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. Path: $ | LineNumber: 0 | BytePositionInLine: 0.

And it here's the stack

enter image description here


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>