C#

Create a new empty array

var ar = {};

If using a JSON serializer/deserializer, consider using:

var ab = new int[] {};
var ac = new bool[] {};
var ar = new MyClass[] {};

Serializing/deserializing Object to/from JSON (Requires newtonsoft NuGet)

public static StringContent CreateRequestBody<T>(T t) =>
  new StringContent(JsonConvert.SerializeObject(t),
                    Encoding.UTF8,
                    "application/json"
  );

public static T ReadResponseBody<T>(string responseBody) =>
  JsonConvert.DeserializeObject<T>(responseBody);