glacasa / Mastonet

C# Library for Mastodon
MIT License
225 stars 36 forks source link

Update History.cs #131

Closed tbolon closed 1 month ago

tbolon commented 1 month ago

Fix de-serialization format in some cases, align to the spec (see. https://docs.joinmastodon.org/entities/Tag/#history).

The JSON value could not be converted to System.Int32. Path: $[0].history[0].day | LineNumber: 0 | BytePositionInLine: 98.
Cannot get the value of a token type 'String' as a number.
tbolon commented 1 month ago

It's caused by System.Text.Json not allowing to implicitly converting from string to int32.