Skip to content

For text/plain, JSON should take precedence over Smile #699

Open
@dleshem

Description

@dleshem

Restlet version: 2.2-m1

My web-service uses the new Jackson 2.1 ("fasterxml") extension, and is accessed via CORS. This means that Internet Explorer 8 & 9 browsers use IE's proprietary XDomainRequest object, which always sends content-type of text/plain.

I have a single resource annotated with @post(json, json)

It seems that when the content-type is text/plain, the framework first attempts to decode the posted representations as Smile format. This causes Jackson's SmileParserBootstrapper to throw a JsonParseException ("Input does not start with Smile format header..."). The first character is of course '{', which is standard JSON but not standard Smile.

See http://svn.codehaus.org/jackson/trunk/src/smile/java/org/codehaus/jackson/smile/SmileParserBootstrapper.java

for text/plain, JSON should take precedence over Smile.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions