REST, JSON and Content-Type

View: New views
5 Messages — Rating Filter:   Alert me  

REST, JSON and Content-Type

by Christopher H. Laco :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

So, I'm trolling through the ASP.NET 3.5 docs on JSON and AJAX and it
talks about GET not being enabled by default for a web service and that
the mime type must be application/json

Of course the REST package has this:

>             'text/x-json'        => 'JSON',

Near as I can gather, the official type is appliction/json:

> http://tech.groups.yahoo.com/group/json/message/337
> http://www.iana.org/assignments/media-types/application/
> http://www.ietf.org/rfc/rfc4627.txt

And to make matters more fun, MIME::Types has neither.

I know, I know. "Well volunteered". :-)

Before I go patching things and submitting RT bugs, what do we want to
do with REST?

I vote to support both mime types. Near as I figure, it can't hurt to do so.

Perhaps a warning about using an outdated mime type?

-=Chris




_______________________________________________
List: Catalyst@...
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@.../
Dev site: http://dev.catalyst.perl.org/

signature.asc (194 bytes) Download Attachment

Re: REST, JSON and Content-Type

by J. Shirley :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, Jun 16, 2008 at 12:45 PM, Christopher H. Laco
<claco@...> wrote:

> So, I'm trolling through the ASP.NET 3.5 docs on JSON and AJAX and it talks
> about GET not being enabled by default for a web service and that the mime
> type must be application/json
>
> Of course the REST package has this:
>
>>            'text/x-json'        => 'JSON',
>
> Near as I can gather, the official type is appliction/json:
>
>> http://tech.groups.yahoo.com/group/json/message/337
>> http://www.iana.org/assignments/media-types/application/
>> http://www.ietf.org/rfc/rfc4627.txt
>
> And to make matters more fun, MIME::Types has neither.
>
> I know, I know. "Well volunteered". :-)
>
> Before I go patching things and submitting RT bugs, what do we want to do
> with REST?
>
> I vote to support both mime types. Near as I figure, it can't hurt to do so.
>
> Perhaps a warning about using an outdated mime type?
>
> -=Chris
>
>
>

I'm in hearty agreement -- and I use "application/json" in my apps these days.

-J

_______________________________________________
List: Catalyst@...
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@.../
Dev site: http://dev.catalyst.perl.org/

Re: REST, JSON and Content-Type

by Christopher H. Laco :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

J. Shirley wrote:

> On Mon, Jun 16, 2008 at 12:45 PM, Christopher H. Laco
> <claco@...> wrote:
>> So, I'm trolling through the ASP.NET 3.5 docs on JSON and AJAX and it talks
>> about GET not being enabled by default for a web service and that the mime
>> type must be application/json
>>
>> Of course the REST package has this:
>>
>>>            'text/x-json'        => 'JSON',
>> Near as I can gather, the official type is appliction/json:
>>
>>> http://tech.groups.yahoo.com/group/json/message/337
>>> http://www.iana.org/assignments/media-types/application/
>>> http://www.ietf.org/rfc/rfc4627.txt
>> And to make matters more fun, MIME::Types has neither.
>>
>> I know, I know. "Well volunteered". :-)
>>
>> Before I go patching things and submitting RT bugs, what do we want to do
>> with REST?
>>
>> I vote to support both mime types. Near as I figure, it can't hurt to do so.
>>
>> Perhaps a warning about using an outdated mime type?
>>
>> -=Chris
>>
>>
>>
>
> I'm in hearty agreement -- and I use "application/json" in my apps these days.
>
> -J
>
>

Committed to trunk.

RT filed for MIME::Types

-=Chris

_______________________________________________
List: Catalyst@...
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@.../
Dev site: http://dev.catalyst.perl.org/

Re: REST, JSON and Content-Type

by Aristotle Pagaltzis :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

* Christopher H. Laco <claco@...> [2008-06-16 21:55]:
> I vote to support both mime types. Near as I figure, it can't
> hurt to do so.

++

> Perhaps a warning about using an outdated mime type?

++

Regards,
--
Aristotle Pagaltzis // <http://plasmasturm.org/>

_______________________________________________
List: Catalyst@...
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@.../
Dev site: http://dev.catalyst.perl.org/

Re: REST, JSON and Content-Type

by Peter Karman :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



On 06/16/2008 06:52 PM, Christopher Laco wrote:

> Committed to trunk.
>
> RT filed for MIME::Types
>

claco++

--
Peter Karman  .  peter@...  .  http://peknet.com/


_______________________________________________
List: Catalyst@...
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@.../
Dev site: http://dev.catalyst.perl.org/
LightInTheBox - Buy quality products at wholesale price