public JsonApiFormatter(Configuration cfg, JsonSerializer jsonSerializer)
{
this.jsonSerializer = jsonSerializer;
configuration = cfg;
SupportedMediaTypes.Add(new MediaTypeHeaderValue(JSON_API_MIME_TYPE));
SupportedEncodings.Add(new UTF8Encoding(false, true));
//if(jsonSerializer.Converters.All(x => x.GetType() != typeof (CompoundDocumentObjectConverter)))
// jsonSerializer.Converters.Add(new CompoundDocumentObjectConverter());
}