Failed to decode json









up vote
-1
down vote

favorite












hi I want to retrieve json data, the json data is like this



"items":[ 

"date_for":"2018-11-11",
"fajr":"5:28 am",
"shurooq":"6:37 am",
"dhuhr":"11:52 am",
"asr":"2:40 pm",
"maghrib":"5:06 pm",
"isha":"6:15 pm"

],


Than I make decodable for JSONDecoder like this:



struct PrayerModel: Decodable 
var items: [Items]


struct Items: Decodable
var fajr: String
var dhuhr: String
var asr: String
var maghrib: String
var isha: String

init(dictionary: [String: String])
self.fajr = dictionary["fajr"] ?? ""
self.dhuhr = dictionary["dhuhr"] ?? ""
self.asr = dictionary["asr"] ?? ""
self.maghrib = dictionary["maghrib"] ?? ""
self.isha = dictionary["isha"] ?? ""




and then I make an object to store decodable data:



struct Prayer 
var prayerName: String
var prayerIcon: UIImage
var prayerTime: String

init(prayerName: String, prayerIcon: UIImage, prayerTime: String)
self.prayerName = prayerName
self.prayerIcon = prayerIcon
self.prayerTime = prayerTime




and retrieve it with URLSession:



do 
let prayerData = try JSONDecoder().decode(PrayerModel.self, from: data)

prayerData.items.forEach( (item) in
let isya = Prayer(prayerName: "Isya", prayerIcon: #imageLiteral(resourceName: "Clear"), prayerTime: item.isha)
self.prayers.append(contentsOf: [shubuh, dzuhur, ashar, maghrib, isya])
)
DispatchQueue.main.async
self.tableView.reloadData()

catch let decodeErr
print("Failed to decode:", decodeErr)



and I got this error




Failed to decode: dataCorrupted(Swift.DecodingError.Context(codingPath: , debugDescription: "The given data was not valid JSON.", underlyingError: Optional(Error Domain=NSCocoaErrorDomain Code=3840 "JSON text did not start with array or object and option to allow fragments not set." UserInfo=NSDebugDescription=JSON text did not start with array or object and option to allow fragments not set.)))




where is the problem for my code, anyone can help?










share|improve this question























  • Read the error message carefully, the problem is not with your code but with the json message that is incorrect. I think it need to be surrounded by a pair of . Off topic but I don’t think you need that init method in your Items struct for decoding json
    – Joakim Danielson
    Nov 11 at 12:49















up vote
-1
down vote

favorite












hi I want to retrieve json data, the json data is like this



"items":[ 

"date_for":"2018-11-11",
"fajr":"5:28 am",
"shurooq":"6:37 am",
"dhuhr":"11:52 am",
"asr":"2:40 pm",
"maghrib":"5:06 pm",
"isha":"6:15 pm"

],


Than I make decodable for JSONDecoder like this:



struct PrayerModel: Decodable 
var items: [Items]


struct Items: Decodable
var fajr: String
var dhuhr: String
var asr: String
var maghrib: String
var isha: String

init(dictionary: [String: String])
self.fajr = dictionary["fajr"] ?? ""
self.dhuhr = dictionary["dhuhr"] ?? ""
self.asr = dictionary["asr"] ?? ""
self.maghrib = dictionary["maghrib"] ?? ""
self.isha = dictionary["isha"] ?? ""




and then I make an object to store decodable data:



struct Prayer 
var prayerName: String
var prayerIcon: UIImage
var prayerTime: String

init(prayerName: String, prayerIcon: UIImage, prayerTime: String)
self.prayerName = prayerName
self.prayerIcon = prayerIcon
self.prayerTime = prayerTime




and retrieve it with URLSession:



do 
let prayerData = try JSONDecoder().decode(PrayerModel.self, from: data)

prayerData.items.forEach( (item) in
let isya = Prayer(prayerName: "Isya", prayerIcon: #imageLiteral(resourceName: "Clear"), prayerTime: item.isha)
self.prayers.append(contentsOf: [shubuh, dzuhur, ashar, maghrib, isya])
)
DispatchQueue.main.async
self.tableView.reloadData()

catch let decodeErr
print("Failed to decode:", decodeErr)



and I got this error




Failed to decode: dataCorrupted(Swift.DecodingError.Context(codingPath: , debugDescription: "The given data was not valid JSON.", underlyingError: Optional(Error Domain=NSCocoaErrorDomain Code=3840 "JSON text did not start with array or object and option to allow fragments not set." UserInfo=NSDebugDescription=JSON text did not start with array or object and option to allow fragments not set.)))




where is the problem for my code, anyone can help?










share|improve this question























  • Read the error message carefully, the problem is not with your code but with the json message that is incorrect. I think it need to be surrounded by a pair of . Off topic but I don’t think you need that init method in your Items struct for decoding json
    – Joakim Danielson
    Nov 11 at 12:49













up vote
-1
down vote

favorite









up vote
-1
down vote

favorite











hi I want to retrieve json data, the json data is like this



"items":[ 

"date_for":"2018-11-11",
"fajr":"5:28 am",
"shurooq":"6:37 am",
"dhuhr":"11:52 am",
"asr":"2:40 pm",
"maghrib":"5:06 pm",
"isha":"6:15 pm"

],


Than I make decodable for JSONDecoder like this:



struct PrayerModel: Decodable 
var items: [Items]


struct Items: Decodable
var fajr: String
var dhuhr: String
var asr: String
var maghrib: String
var isha: String

init(dictionary: [String: String])
self.fajr = dictionary["fajr"] ?? ""
self.dhuhr = dictionary["dhuhr"] ?? ""
self.asr = dictionary["asr"] ?? ""
self.maghrib = dictionary["maghrib"] ?? ""
self.isha = dictionary["isha"] ?? ""




and then I make an object to store decodable data:



struct Prayer 
var prayerName: String
var prayerIcon: UIImage
var prayerTime: String

init(prayerName: String, prayerIcon: UIImage, prayerTime: String)
self.prayerName = prayerName
self.prayerIcon = prayerIcon
self.prayerTime = prayerTime




and retrieve it with URLSession:



do 
let prayerData = try JSONDecoder().decode(PrayerModel.self, from: data)

prayerData.items.forEach( (item) in
let isya = Prayer(prayerName: "Isya", prayerIcon: #imageLiteral(resourceName: "Clear"), prayerTime: item.isha)
self.prayers.append(contentsOf: [shubuh, dzuhur, ashar, maghrib, isya])
)
DispatchQueue.main.async
self.tableView.reloadData()

catch let decodeErr
print("Failed to decode:", decodeErr)



and I got this error




Failed to decode: dataCorrupted(Swift.DecodingError.Context(codingPath: , debugDescription: "The given data was not valid JSON.", underlyingError: Optional(Error Domain=NSCocoaErrorDomain Code=3840 "JSON text did not start with array or object and option to allow fragments not set." UserInfo=NSDebugDescription=JSON text did not start with array or object and option to allow fragments not set.)))




where is the problem for my code, anyone can help?










share|improve this question















hi I want to retrieve json data, the json data is like this



"items":[ 

"date_for":"2018-11-11",
"fajr":"5:28 am",
"shurooq":"6:37 am",
"dhuhr":"11:52 am",
"asr":"2:40 pm",
"maghrib":"5:06 pm",
"isha":"6:15 pm"

],


Than I make decodable for JSONDecoder like this:



struct PrayerModel: Decodable 
var items: [Items]


struct Items: Decodable
var fajr: String
var dhuhr: String
var asr: String
var maghrib: String
var isha: String

init(dictionary: [String: String])
self.fajr = dictionary["fajr"] ?? ""
self.dhuhr = dictionary["dhuhr"] ?? ""
self.asr = dictionary["asr"] ?? ""
self.maghrib = dictionary["maghrib"] ?? ""
self.isha = dictionary["isha"] ?? ""




and then I make an object to store decodable data:



struct Prayer 
var prayerName: String
var prayerIcon: UIImage
var prayerTime: String

init(prayerName: String, prayerIcon: UIImage, prayerTime: String)
self.prayerName = prayerName
self.prayerIcon = prayerIcon
self.prayerTime = prayerTime




and retrieve it with URLSession:



do 
let prayerData = try JSONDecoder().decode(PrayerModel.self, from: data)

prayerData.items.forEach( (item) in
let isya = Prayer(prayerName: "Isya", prayerIcon: #imageLiteral(resourceName: "Clear"), prayerTime: item.isha)
self.prayers.append(contentsOf: [shubuh, dzuhur, ashar, maghrib, isya])
)
DispatchQueue.main.async
self.tableView.reloadData()

catch let decodeErr
print("Failed to decode:", decodeErr)



and I got this error




Failed to decode: dataCorrupted(Swift.DecodingError.Context(codingPath: , debugDescription: "The given data was not valid JSON.", underlyingError: Optional(Error Domain=NSCocoaErrorDomain Code=3840 "JSON text did not start with array or object and option to allow fragments not set." UserInfo=NSDebugDescription=JSON text did not start with array or object and option to allow fragments not set.)))




where is the problem for my code, anyone can help?







ios json swift decodable






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 11 at 15:04









Daniel Larsson

549419




549419










asked Nov 11 at 12:35









ferryawijayanto

587




587











  • Read the error message carefully, the problem is not with your code but with the json message that is incorrect. I think it need to be surrounded by a pair of . Off topic but I don’t think you need that init method in your Items struct for decoding json
    – Joakim Danielson
    Nov 11 at 12:49

















  • Read the error message carefully, the problem is not with your code but with the json message that is incorrect. I think it need to be surrounded by a pair of . Off topic but I don’t think you need that init method in your Items struct for decoding json
    – Joakim Danielson
    Nov 11 at 12:49
















Read the error message carefully, the problem is not with your code but with the json message that is incorrect. I think it need to be surrounded by a pair of . Off topic but I don’t think you need that init method in your Items struct for decoding json
– Joakim Danielson
Nov 11 at 12:49





Read the error message carefully, the problem is not with your code but with the json message that is incorrect. I think it need to be surrounded by a pair of . Off topic but I don’t think you need that init method in your Items struct for decoding json
– Joakim Danielson
Nov 11 at 12:49













2 Answers
2






active

oldest

votes

















up vote
-1
down vote



accepted










If you want to use Decodable prototype with your JSON, than variables should have exact the same name and include all items with same position.



Try this:



var date_for: String
var fajr: String
var shurooq: String
var dhuhr: String
var asr: String
var maghrib: String
var isha: String

init(dictionary: [String: String])
self.date_for = dictionary["date_for"] ?? ""
self.fajr = dictionary["fajr"] ?? ""
self.shurooq = dictionary["shurooq"] ?? ""
self.dhuhr = dictionary["dhuhr"] ?? ""
self.asr = dictionary["asr"] ?? ""
self.maghrib = dictionary["maghrib"] ?? ""
self.isha = dictionary["isha"] ?? ""






share|improve this answer




















  • thank you, I thought since I need only a bit part of data I can skip it. thank you it works!
    – ferryawijayanto
    Nov 11 at 13:16










  • This answer is not relevant to the question since you do not have to include all the same items so it wouldn't generate an error and definitely not the error in the question.
    – Joakim Danielson
    Nov 11 at 15:43











  • @ferryawijayanto, you can skip fields you don’t need.
    – Joakim Danielson
    Nov 12 at 19:24

















up vote
0
down vote













Like I mentioned in my comment the json message is incorrect, I added to it and it worked fine.




"items":[

"date_for":"2018-11-11",
"fajr":"5:28 am",
"shurooq":"6:37 am",
"dhuhr":"11:52 am",
"asr":"2:40 pm",
"maghrib":"5:06 pm",
"isha":"6:15 pm"

]




And you do not have to include all elements in the json message if you do not want to use them, I removed the init() method from Items since it is not used.



struct Items: Decodable 
var fajr: String
var dhuhr: String
var asr: String
var maghrib: String
var isha: String



Then it worked perfectly fine with the below code



let str = ""items":["date_for":"2018-11-11","fajr":"5:28 am","shurooq":"6:37 am","dhuhr":"11:52 am","asr":"2:40 pm","maghrib":"5:06 pm","isha":"6:15 pm"]"

do
if let data = str.data(using: .utf8)
let prayerData = try JSONDecoder().decode(PrayerModel.self, from: data)
for item in prayerData.items
print(item)


catch let decodeErr
print("Failed to decode:", decodeErr)






share|improve this answer




















    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53248815%2ffailed-to-decode-json%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    -1
    down vote



    accepted










    If you want to use Decodable prototype with your JSON, than variables should have exact the same name and include all items with same position.



    Try this:



    var date_for: String
    var fajr: String
    var shurooq: String
    var dhuhr: String
    var asr: String
    var maghrib: String
    var isha: String

    init(dictionary: [String: String])
    self.date_for = dictionary["date_for"] ?? ""
    self.fajr = dictionary["fajr"] ?? ""
    self.shurooq = dictionary["shurooq"] ?? ""
    self.dhuhr = dictionary["dhuhr"] ?? ""
    self.asr = dictionary["asr"] ?? ""
    self.maghrib = dictionary["maghrib"] ?? ""
    self.isha = dictionary["isha"] ?? ""






    share|improve this answer




















    • thank you, I thought since I need only a bit part of data I can skip it. thank you it works!
      – ferryawijayanto
      Nov 11 at 13:16










    • This answer is not relevant to the question since you do not have to include all the same items so it wouldn't generate an error and definitely not the error in the question.
      – Joakim Danielson
      Nov 11 at 15:43











    • @ferryawijayanto, you can skip fields you don’t need.
      – Joakim Danielson
      Nov 12 at 19:24














    up vote
    -1
    down vote



    accepted










    If you want to use Decodable prototype with your JSON, than variables should have exact the same name and include all items with same position.



    Try this:



    var date_for: String
    var fajr: String
    var shurooq: String
    var dhuhr: String
    var asr: String
    var maghrib: String
    var isha: String

    init(dictionary: [String: String])
    self.date_for = dictionary["date_for"] ?? ""
    self.fajr = dictionary["fajr"] ?? ""
    self.shurooq = dictionary["shurooq"] ?? ""
    self.dhuhr = dictionary["dhuhr"] ?? ""
    self.asr = dictionary["asr"] ?? ""
    self.maghrib = dictionary["maghrib"] ?? ""
    self.isha = dictionary["isha"] ?? ""






    share|improve this answer




















    • thank you, I thought since I need only a bit part of data I can skip it. thank you it works!
      – ferryawijayanto
      Nov 11 at 13:16










    • This answer is not relevant to the question since you do not have to include all the same items so it wouldn't generate an error and definitely not the error in the question.
      – Joakim Danielson
      Nov 11 at 15:43











    • @ferryawijayanto, you can skip fields you don’t need.
      – Joakim Danielson
      Nov 12 at 19:24












    up vote
    -1
    down vote



    accepted







    up vote
    -1
    down vote



    accepted






    If you want to use Decodable prototype with your JSON, than variables should have exact the same name and include all items with same position.



    Try this:



    var date_for: String
    var fajr: String
    var shurooq: String
    var dhuhr: String
    var asr: String
    var maghrib: String
    var isha: String

    init(dictionary: [String: String])
    self.date_for = dictionary["date_for"] ?? ""
    self.fajr = dictionary["fajr"] ?? ""
    self.shurooq = dictionary["shurooq"] ?? ""
    self.dhuhr = dictionary["dhuhr"] ?? ""
    self.asr = dictionary["asr"] ?? ""
    self.maghrib = dictionary["maghrib"] ?? ""
    self.isha = dictionary["isha"] ?? ""






    share|improve this answer












    If you want to use Decodable prototype with your JSON, than variables should have exact the same name and include all items with same position.



    Try this:



    var date_for: String
    var fajr: String
    var shurooq: String
    var dhuhr: String
    var asr: String
    var maghrib: String
    var isha: String

    init(dictionary: [String: String])
    self.date_for = dictionary["date_for"] ?? ""
    self.fajr = dictionary["fajr"] ?? ""
    self.shurooq = dictionary["shurooq"] ?? ""
    self.dhuhr = dictionary["dhuhr"] ?? ""
    self.asr = dictionary["asr"] ?? ""
    self.maghrib = dictionary["maghrib"] ?? ""
    self.isha = dictionary["isha"] ?? ""







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Nov 11 at 13:00









    Den Andreychuk

    587




    587











    • thank you, I thought since I need only a bit part of data I can skip it. thank you it works!
      – ferryawijayanto
      Nov 11 at 13:16










    • This answer is not relevant to the question since you do not have to include all the same items so it wouldn't generate an error and definitely not the error in the question.
      – Joakim Danielson
      Nov 11 at 15:43











    • @ferryawijayanto, you can skip fields you don’t need.
      – Joakim Danielson
      Nov 12 at 19:24
















    • thank you, I thought since I need only a bit part of data I can skip it. thank you it works!
      – ferryawijayanto
      Nov 11 at 13:16










    • This answer is not relevant to the question since you do not have to include all the same items so it wouldn't generate an error and definitely not the error in the question.
      – Joakim Danielson
      Nov 11 at 15:43











    • @ferryawijayanto, you can skip fields you don’t need.
      – Joakim Danielson
      Nov 12 at 19:24















    thank you, I thought since I need only a bit part of data I can skip it. thank you it works!
    – ferryawijayanto
    Nov 11 at 13:16




    thank you, I thought since I need only a bit part of data I can skip it. thank you it works!
    – ferryawijayanto
    Nov 11 at 13:16












    This answer is not relevant to the question since you do not have to include all the same items so it wouldn't generate an error and definitely not the error in the question.
    – Joakim Danielson
    Nov 11 at 15:43





    This answer is not relevant to the question since you do not have to include all the same items so it wouldn't generate an error and definitely not the error in the question.
    – Joakim Danielson
    Nov 11 at 15:43













    @ferryawijayanto, you can skip fields you don’t need.
    – Joakim Danielson
    Nov 12 at 19:24




    @ferryawijayanto, you can skip fields you don’t need.
    – Joakim Danielson
    Nov 12 at 19:24












    up vote
    0
    down vote













    Like I mentioned in my comment the json message is incorrect, I added to it and it worked fine.




    "items":[

    "date_for":"2018-11-11",
    "fajr":"5:28 am",
    "shurooq":"6:37 am",
    "dhuhr":"11:52 am",
    "asr":"2:40 pm",
    "maghrib":"5:06 pm",
    "isha":"6:15 pm"

    ]




    And you do not have to include all elements in the json message if you do not want to use them, I removed the init() method from Items since it is not used.



    struct Items: Decodable 
    var fajr: String
    var dhuhr: String
    var asr: String
    var maghrib: String
    var isha: String



    Then it worked perfectly fine with the below code



    let str = ""items":["date_for":"2018-11-11","fajr":"5:28 am","shurooq":"6:37 am","dhuhr":"11:52 am","asr":"2:40 pm","maghrib":"5:06 pm","isha":"6:15 pm"]"

    do
    if let data = str.data(using: .utf8)
    let prayerData = try JSONDecoder().decode(PrayerModel.self, from: data)
    for item in prayerData.items
    print(item)


    catch let decodeErr
    print("Failed to decode:", decodeErr)






    share|improve this answer
























      up vote
      0
      down vote













      Like I mentioned in my comment the json message is incorrect, I added to it and it worked fine.




      "items":[

      "date_for":"2018-11-11",
      "fajr":"5:28 am",
      "shurooq":"6:37 am",
      "dhuhr":"11:52 am",
      "asr":"2:40 pm",
      "maghrib":"5:06 pm",
      "isha":"6:15 pm"

      ]




      And you do not have to include all elements in the json message if you do not want to use them, I removed the init() method from Items since it is not used.



      struct Items: Decodable 
      var fajr: String
      var dhuhr: String
      var asr: String
      var maghrib: String
      var isha: String



      Then it worked perfectly fine with the below code



      let str = ""items":["date_for":"2018-11-11","fajr":"5:28 am","shurooq":"6:37 am","dhuhr":"11:52 am","asr":"2:40 pm","maghrib":"5:06 pm","isha":"6:15 pm"]"

      do
      if let data = str.data(using: .utf8)
      let prayerData = try JSONDecoder().decode(PrayerModel.self, from: data)
      for item in prayerData.items
      print(item)


      catch let decodeErr
      print("Failed to decode:", decodeErr)






      share|improve this answer






















        up vote
        0
        down vote










        up vote
        0
        down vote









        Like I mentioned in my comment the json message is incorrect, I added to it and it worked fine.




        "items":[

        "date_for":"2018-11-11",
        "fajr":"5:28 am",
        "shurooq":"6:37 am",
        "dhuhr":"11:52 am",
        "asr":"2:40 pm",
        "maghrib":"5:06 pm",
        "isha":"6:15 pm"

        ]




        And you do not have to include all elements in the json message if you do not want to use them, I removed the init() method from Items since it is not used.



        struct Items: Decodable 
        var fajr: String
        var dhuhr: String
        var asr: String
        var maghrib: String
        var isha: String



        Then it worked perfectly fine with the below code



        let str = ""items":["date_for":"2018-11-11","fajr":"5:28 am","shurooq":"6:37 am","dhuhr":"11:52 am","asr":"2:40 pm","maghrib":"5:06 pm","isha":"6:15 pm"]"

        do
        if let data = str.data(using: .utf8)
        let prayerData = try JSONDecoder().decode(PrayerModel.self, from: data)
        for item in prayerData.items
        print(item)


        catch let decodeErr
        print("Failed to decode:", decodeErr)






        share|improve this answer












        Like I mentioned in my comment the json message is incorrect, I added to it and it worked fine.




        "items":[

        "date_for":"2018-11-11",
        "fajr":"5:28 am",
        "shurooq":"6:37 am",
        "dhuhr":"11:52 am",
        "asr":"2:40 pm",
        "maghrib":"5:06 pm",
        "isha":"6:15 pm"

        ]




        And you do not have to include all elements in the json message if you do not want to use them, I removed the init() method from Items since it is not used.



        struct Items: Decodable 
        var fajr: String
        var dhuhr: String
        var asr: String
        var maghrib: String
        var isha: String



        Then it worked perfectly fine with the below code



        let str = ""items":["date_for":"2018-11-11","fajr":"5:28 am","shurooq":"6:37 am","dhuhr":"11:52 am","asr":"2:40 pm","maghrib":"5:06 pm","isha":"6:15 pm"]"

        do
        if let data = str.data(using: .utf8)
        let prayerData = try JSONDecoder().decode(PrayerModel.self, from: data)
        for item in prayerData.items
        print(item)


        catch let decodeErr
        print("Failed to decode:", decodeErr)







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 11 at 15:44









        Joakim Danielson

        5,8303621




        5,8303621



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53248815%2ffailed-to-decode-json%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            這個網誌中的熱門文章

            What does pagestruct do in Eviews?

            Dutch intervention in Lombok and Karangasem

            Channel Islands