mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Merge pull request #3898 from crobibero/fix-int64
Return int64 in json as number
This commit is contained in:
commit
af78b9c2e8
@ -8,7 +8,7 @@ using System.Text.Json.Serialization;
|
|||||||
namespace MediaBrowser.Common.Json.Converters
|
namespace MediaBrowser.Common.Json.Converters
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Long to String JSON converter.
|
/// Parse JSON string as long.
|
||||||
/// Javascript does not support 64-bit integers.
|
/// Javascript does not support 64-bit integers.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class JsonInt64Converter : JsonConverter<long>
|
public class JsonInt64Converter : JsonConverter<long>
|
||||||
@ -43,14 +43,14 @@ namespace MediaBrowser.Common.Json.Converters
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Write long to JSON string.
|
/// Write long to JSON long.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="writer"><see cref="Utf8JsonWriter"/>.</param>
|
/// <param name="writer"><see cref="Utf8JsonWriter"/>.</param>
|
||||||
/// <param name="value">Value to write.</param>
|
/// <param name="value">Value to write.</param>
|
||||||
/// <param name="options">Options.</param>
|
/// <param name="options">Options.</param>
|
||||||
public override void Write(Utf8JsonWriter writer, long value, JsonSerializerOptions options)
|
public override void Write(Utf8JsonWriter writer, long value, JsonSerializerOptions options)
|
||||||
{
|
{
|
||||||
writer.WriteStringValue(value.ToString(NumberFormatInfo.InvariantInfo));
|
writer.WriteNumberValue(value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user