Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8662053
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T16:38:35+00:00 2026-06-12T16:38:35+00:00

I am working with ExtJs 4.0. I want to read json file in my

  • 0

I am working with ExtJs 4.0. I want to read json file in my chart but gettig following error
Ext.Error: Unable to parse the JSON returned by the server: You’re trying to decode an invalid JSON String.

store n model:

 Ext.define('chartModel', {
    extend: 'Ext.data.Model',
    fields: [ 
            {name: 'year'},
            {name: 'comedy'},
            {name: 'action'},
            {name: 'drama'},
            {name: 'thriller'}
    ]
});

var myStore = Ext.create('Ext.data.Store', {
    model: chartModel,
    proxy: {
        type: 'ajax',
        url : '/data.json',
        reader: {
            type: 'json',
            root: 'data',
            method: "GET",
            messageProperty: 'jsonData'
        }
    },
    autoLoad: true
});

data.json file:

data: [{year: 2005, comedy: 34000000, action: 23890000, drama: 18450000, thriller: 20060000}]
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T16:38:37+00:00Added an answer on June 12, 2026 at 4:38 pm

    JSON property names must be quoted to be considered valid. In addition, your data needs to be a property of an object, like {"data":[{"year":2005, "comedy":3400000....

    EDIT: What Neil said is correct. Ext.decode does not require property names to be in quotes. However, the JSON standard does require them so you should definitely get in the habit of using them.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on extjs & i want to make a bar chart from
I am using a star rating plugin with ExtJS that is working well, but
I've recently started working with JSON and the ExtJs framework and I've come across
This code is working in Extjs 4.0.2a but when converted to 4.1 it no
this code working in extjs 3 but now i convet my app to extjs
I'm working with ExtJs on IE9.. and i almost always get this error.. Microsoft
ExtJS have adapter for working with other javascript libraries. But why? Why not just
I am working with ExtJs 4.0.I want to access aspx.cs page method to fetch
I'm having issues. I want to use the nice ExtJS associations, but they're not
I am working with Extjs 3.2 ,my Editor grid consist of 5 column, 4

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.