Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content type stored as Constants/CTYPE_JSON_UTF8 is read as a different string #125

Closed
michaelklishin opened this issue Apr 25, 2012 · 1 comment

Comments

@michaelklishin
Copy link
Contributor

In Welle we have a "smart" deserialization feature that works like this: if IRiakObject content type is known, we deserialize the value automatically for common formats like text or JSON. During this process, IRiakObject's content type is compared with the Constants/CTYPE_JSON_UTF8 value. In 1.1 this value is

public static String CTYPE_JSON_UTF8 = "application/json;charset=UTF-8";

note that there is no space between base content type and parameters. This is not a problem in general but when content type is read from IRiakObject, the space between base type and parameter list magically appears and comparison fails: application/json;charset=UTF-8" is not equal to application/json; charset=UTF-8".

This is a very annoying problem that makes the constant rather useless.

@ghost ghost assigned broach May 21, 2012
@broach
Copy link
Contributor

broach commented May 30, 2012

Addressed in PR #136

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants