I recently realized that serializing arrays with both Json.NET and Jil libraries, results a wrong JSON object! at least as far as https://jsonlint.com says. For example
var serializer = // Json.NET_Serializer or Jil_Serializer;
var json = serializer.Serialize(new[] {1,2,3,4,5});
Console.WriteLine(json);
results { [1, 2, 3, 4, 5] }
which as https://jsonlint.com (and also https://jsonformatter.curiousconcept.com/) says, is wrong
// The error message in jsonformatter:
Expecting string or }, not [.
and expected result I think is:
[1, 2, 3, 4, 5]
Is there any hidden point which I missed? For example is there any special setting in Json.NET or Jil to solve this problem?
UPDATE: Note that the question is not how to achieve the mentioned result. But is about how to get JSON.NET or JIL to work right. Thanks in advance.