I am not sure what has happened, but all of a sudden I am getting weird behaviour in my controller. 

The controller is set up to return a json serialized object like so:

```
return Ok(JsonConvert.SerializeObject(result, Formatting.Indented));

```

It was working correctly but now it is returning this instead:

```
"{\r\n  \"ProductID\": 1,\r\n  \"ArticleID\": \"a1\",\r\n  \"ProductDescription\": \"new dress\",\r\n  \"ProductType\": \"1\",\r\n  \"MaterialDescription\": \"cotton\",\r\n  \"Qty\": 1,\r\n  \"SizeID\": 1,\r\n  \"RetailPrice\": 22.00,\r\n  \"ImagePath\": \"C:\\\\Users\\\\Harry\\\\Desktop\\\\IMG_8931.JPG\",\r\n  \"ProductVaritiesID\": 1,\r\n  \"Discount\": 0.00,\r\n  \"QuantityInStock\": 10,\r\n  \"ProductTypeID\": 1,\r\n  \"ProductOrderQuantity\": 0\r\n}"

```

However, if I return this object without serializing like so:

```
        return Ok(result);

```

It returns the an object like so:

```
{
    "ProductID": 1,
    "ArticleID": "a1",
    "ProductDescription": "new dress",
    "ProductType": "1",
    "MaterialDescription": "cotton",
    "Qty": 1,
    "SizeID": 1,
    "RetailPrice": 22,
    "ImagePath": "C:\\Users\\Harry\\Desktop\\IMG_8931.JPG",
    "ProductVaritiesID": 1,
    "Discount": 0,
    "QuantityInStock": 10,
    "ProductTypeID": 1,
    "ProductOrderQuantity": 0
}

Controller:
        [EnableCors(origins: "*", headers: "*", methods: "GET")]
        [Route("api/product/getproductbybarcode")]
        [ResponseType(typeof(Product))]
        public IHttpActionResult GetProductByBarcode(string barcodevalue)
        {
            if (string.IsNullOrEmpty(barcodevalue))
                return NotFound(); //replace with correct message

            var result = _iproduct.GetProductByBarcode(barcodevalue);

            return Ok(JsonConvert.SerializeObject(result, Formatting.Indented));
        }

```

I cannot figure out, what is causing the Json serialization to fail?