Steve, I'd be interested in this "Rails JSON media type" as well, but we 
can talk this weekend in Berlin. There is definitely a common behaviour 
that a lot of Rails projects would appreciate for a CRUD-style PATCH where 
the media type defines what will get overwritten, deleted, updated, also, 
with nested models, etc. Defining a media type would help Rails 
understanding that REST is not exposing a CRUD API through JSON.

Nick

On Tuesday, August 14, 2012 5:45:32 PM UTC+2, Steve Klabnik wrote:
>
> > Should I put in a ticket for that? 
>
> This is exactly where feature requests go. So you kinda already did. ;) 
>
> > If you are trying to do a patch, then JSON in the request could be 
> easily 
> > converted to model representation in Rails. But just handling off the 
> > implementation of a patch to the developer leaves a lot up in the air. 
>
> Yep. I've been giving some though to declaring some sort of 'Rails 
> flavored JSON' that would be able to address these kinds of issues, 
> but it's not near the proposal stage yet. We don't know what every 
> application needs, so currently, it's left up to each dev. 
>
> > For example, when parsing a patch, it would seem that there would be 
> some 
> > way to differentiate between the incoming PATCH request specifying an 
> > attribute as nil 
>
> Again, this is the reason why PATCH requires a diff media type be sent 
> to it. Then there's no question. 
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-core/-/B-YVBciO6RUJ.
To post to this group, send email to rubyonrails-core@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-core+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en.

Reply via email to