Forum Discussion

ScottUFR's avatar
ScottUFR
Occasional Contributor
12 years ago

JSON parsing error

Hi,

The content shown below results in <Not JSON content> being shown. Fiddler and JSONLint are ok with the content. Any ideas what might be causing this problem?

Thanks,
Scott

HTTP/1.1 200 OK
Content-Length: 392
Content-Type: application/JSON; charset=utf-8
Server: Microsoft-IIS/7.5
X-Powered-By: ASP.NET
Date: Tue, 09 Jul 2013 18:12:36 GMT

[{"description":"AddedBy: AAAAAAA using BBBB Tracker Editing Utility.","effectivity":"2009-01-01T00:00:00.000000","fixedLocation":{"altitude":99.4109966909568,"latitude":9.533589822433133,"longitude":-9.50473292400416},"mappings":null,"maxElevation":90,"measModels":null,"minElevation":0,"name":"CCCCC","number":399,"providerData":null,"securityClassification":"UNCLASSIFIED","type":"Fixed"}]
  • nmrao's avatar
    nmrao
    Icon for Champion Level 2 rankChampion Level 2
    whar is the exact error? Is date missing the timezione, like "+01:00" in the end ?
  • ScottUFR's avatar
    ScottUFR
    Occasional Contributor
    It seems that SoapUI is expecting the content type to be application/json and doesn't accept application/JSON as the same thing. I'm not sure why my server (IIS 7.5 and WCF) is producing application/JSON, though I did specify the accept type as application/JSON at some point. Perhaps case-insensitive compare and then using cached value?

    Thanks.
  • ScottUFR's avatar
    ScottUFR
    Occasional Contributor
    Following up. RFC 2045 describes the Content-Type header field as follows (making the previously described behavior a bug):


    5.1. Syntax of the Content-Type Header Field


    In the Augmented BNF notation of RFC 822, a Content-Type header field
    value is defined as follows:

    content := "Content-Type" ":" type "/" subtype
    *(";" parameter)
    ; Matching of media type and subtype
    ; is ALWAYS case-insensitive.




    Scott