Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-14628] MobileWeb: Data with JSON mime type seen as binary

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2014-03-27T23:26:04.000+0000
Affected Version/sn/a
Fix Version/s2014 Sprint 06, 2014 Sprint 06 Tooling, Release 3.3.0
ComponentsMobileWeb
Labelsmobileweb, module_filesystem, qe-testadded
ReporterBrenton House
AssigneeChris Barber
Created2013-07-19T20:26:16.000+0000
Updated2014-07-26T05:07:18.000+0000

Description

When reading in a file that has a mime type of "application/json", the contents are seen as binary and then cannot be parsed correctly. I created pull request 4465 to fix this issue: https://github.com/appcelerator/titanium_mobile/pull/4465

Attachments

FileDateSize
TIMOB-14628.zip2014-06-16T16:45:14.000+00004065196

Comments

  1. Brenton House 2013-11-21

    Is there any update on this? I am installing the latest SDK from github and everytime I install, I have to go and fix this file... It is a very small change. Any chance this could get put into 3.2? Thanks!!
  2. Brenton House 2014-02-12

    Are there any updates on this issue? How can we get this bug fix pushed into a build? Thanks!!
  3. Chris Barber 2014-03-27

    Master pull request: https://github.com/appcelerator/titanium_mobile/pull/4460
  4. Chris Barber 2014-05-08

    [~emerriman] I don't have a test case. Turns out the Bryan had fixed this in the Windows Hybrid branch (prior to being merged with master) as well as we had a community PR from [~brentonhouse]. Bryan never had a test case as far as I know. To test this, you can simply add a json file to your project, use Ti.Filesystem to read in the json file and you can check if the blob is binary and you can also print out its contents.
  5. Samuel Dowse 2014-06-13

    Environment

    Mac OSX 10.9.3 Windows 8.1 Appcelerator Studio, build: 3.3.0.201406111952 Titanium SDK, build: 3.3.0.v20140613124912 Titanium CLI, build: 3.3.0-rc Alloy: 1.4.0-rc Chrome: 35.0.1916.153 Firefox: 30.0.0 Safari: 7.0.4 Internet Explorer: 11.0.9600.17126

    Results

    Using Firefox, the Mime-Type displayed: application/json Using Chrome, the Mime-Type displayed: text/plain; charset=x-user-defined Using Safari, the Mime-Type displayed: text/plain; charset=x-user-defined Using Internet Explorer, the Mime-Type displayed: application/json Also tested on other platforms and found the following: Android: application/octet-stream iOS: application/json BlackBerry: Does not display a mime type

    Extra Information

    All of the above can read the JSON file correctly and will not display any binary data. Therefore, closing this ticket.

JSON Source