[ 
https://issues.apache.org/jira/browse/CB-8792?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14513716#comment-14513716
 ] 

ASF GitHub Bot commented on CB-8792:
------------------------------------

GitHub user vladimir-kotikov opened a pull request:

    https://github.com/apache/cordova-plugin-file/pull/114

    CB-8792 Fixes reading of json files using readAsText

    Jira issue: https://issues.apache.org/jira/browse/CB-8792

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/MSOpenTech/cordova-plugin-file CB-8792

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-plugin-file/pull/114.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #114
    
----
commit 18777980f154a18545a5e169b6fcb6ff2df991e6
Author: Vladimir Kotikov <v-vlk...@microsoft.com>
Date:   2015-04-24T07:50:22Z

    CB-8792 Fixes reading of json files using readAsText

----


> Windows Phone 8 only: File Plugin: readAsText leads to object instead string
> ----------------------------------------------------------------------------
>
>                 Key: CB-8792
>                 URL: https://issues.apache.org/jira/browse/CB-8792
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin File, WP8
>    Affects Versions: 3.4.0
>         Environment: Windows 8.1, Visual Studio with Cordova, Emulators, 
> native Devices
>            Reporter: Martin Luckow
>            Assignee: Vladimir Kotikov
>              Labels: cordova-plugin-file
>
> I have to read and write local JSON-Files in my Cordova-Project. I use the 
> current and previous versions of File-Plugin.
> Writing works fine under all platforms.
> Reading under iOS and Android and Windows 8.1 works.
> Reading under Windows Phone 8 (device and emulator) has a strange effect: 
> instead of getting a string I get the already decoded object stored in the 
> JSON-File
> ...
> function GotFileEntry(fileEntry) {
>   fileEntry.file(GotFile, Fail);
>   function GotFile(file) {
>     var reader = new FileReader();
>     reader.onload = function (evt) {
>       // Here evt.target.result is the decoded object instead a string.
>     };
>     reader.onerror = function (evt) {
>        // No error occurs
>     };
>     reader.readAsText(file);
> }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org

Reply via email to