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

  • Home
  • SEARCH
  • 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 6104183
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:48:46+00:00 2026-05-23T13:48:46+00:00

JSON is very similar to Python syntax. Can all JSON objects directly convert to

  • 0

JSON is very similar to Python syntax. Can all JSON objects directly convert to Python without error?

Example

The following is a valid JSON object:

// Valid JSON
{"foo":"bar"}

This object will directly translate to a Python dictionary with key “foo” and value “bar”:

# Python
json_dict = eval('{"foo":"bar"}')
  • 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-23T13:48:47+00:00Added an answer on May 23, 2026 at 1:48 pm

    No. In particular, true, false, and null are not Python, although they do have direct equivalents in Python (True, False, and None respectively).

    // Valid JSON
    {"sky_is_blue":true}
    

    But when used in Python…

    # Python
    >>> json_dict = eval('{"sky_is_blue":true}')
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "<string>", line 1, in <module>
    NameError: name 'true' is not defined
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Since Object Initializers are very similar to JSON, and now there are Anonymous Types
I have a JSON array with ActiveRecord objects. These objects can be reconstructed using
The JSON syntax is very simple but also very strict with names and strings.
I've been using the json module in python 2.6 but is very slow. I'd
I've got some JSON data, but it's all on one line. Does anyone know
The output of my JSON call can either be an Array or a Hash.
My question is very similar to Java: HTTP Post to create new "Product" in
My JSON string looks like this, [{id : 38,heading : Can you also figure
I have a very large JSON string that I need to parse with in-browser
My question is very similar this but I guess I need to take it

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.