Philip (bluesmoon) wrote,

JSON has a type

IANA has officially registered a MIME type for JSON: application/json.

What this means is that if you return JSON data from a web service, then you should set your Content-type header to application/json.

PHP: header("Content-type: application/json");
Perl: print header(-type => 'application/json');
Most anything else: print "Content-type: application/json\r\n";

  • EOF

    I will probably not post anything useful here. Visit for everything happening with me.

  • TripIt annoyances

    TripIt has a really annoying bug with their session management, and it hits me every time I use the site. This is my flow (Firefox 3.5 on Linux): 1.…

  • Summer in the valley

    It's definitely summer time in Silicon Valley. Day time temperatures are up at around 30°C and nights are pleasant enough to walk around without…

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded