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 7195929
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T20:40:43+00:00 2026-05-28T20:40:43+00:00

I upgraded an app to django 1.3.1 and the json output changed from curly

  • 0

I upgraded an app to django 1.3.1 and the json output changed from curly brackets to square brackets.

Before:

{
  {
    "code": "KENNEDYS08",
    "duration": 23,
    "preview_frame": 1,
  }
}

After:

[
  {
    "code": "KENNEDYS08",
    "duration": 23,
    "preview_frame": 1,
  }
]

The code that returns the json:

output = json.dumps(data, ensure_ascii=False, indent=2)

Is there an option for replacing the square brackets [] for curly brackets {}?

  • 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-05-28T20:40:44+00:00Added an answer on May 28, 2026 at 8:40 pm

    when you have {} in Json is the same as having a dictionary in python ! which means that in a dictionary you always need a key/value ! so the first one is incorrect! if was like that in previous version of Django, thats why the change for the [] version, which is the right one indeed, and should be followed!

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

Sidebar

Related Questions

Upgraded an app from 2.3 to 3.0 and now getting these. What's the best
I recently upgraded my app from Spring 2.5.6 to Spring 3.0.0. A few days
This is a warning that began to appear after I upgraded my app from
I have upgraded my grails app from 1.3.7 to 2.0.1. I had few static
I have code that is triggered on launch only after the app is upgraded
I recently upgraded my Silverlight app from 3 to 4. After a few hours
Today I upgraded our grails app from 1.0.3 to 1.3.3 and, of course, things
I have a C# 4.0 Winform app that I just upgraded from 3.5 to
We recently upgraded our rails app from version 3.0.3 to 3.1.0. The application runs
I upgraded my app to grails 1.3.1 (from 1.2.1). everything works fine expect foo.refresh()

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.