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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T22:56:26+00:00 2026-05-31T22:56:26+00:00

I just have a question regarding SimpleJSON’s documentation. Is it implicit understood that functions

  • 0

I just have a question regarding SimpleJSON’s documentation. Is it implicit understood that functions for example .get() can be used without the need of the author to document it? Or is it something regarding how python works instead for how SimpleJSON works, thus no need to write it down? I got really frustrated when I couldn’t find in the documentation that get() could be used.

http://simplejson.readthedocs.org/en/latest/index.html

For example following code

import simplejson as json
import urllib2


req = urllib2.Request("http://example.com/someJson")
opener = urllib2.build_opener()
f = opener.open(req)

data = json.load(f)

print data.get('results')

I couldn’t find anywhere in the documentation about this function.

  • 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-31T22:56:27+00:00Added an answer on May 31, 2026 at 10:56 pm

    json.load() will deserialize your JSON document and return a Python object.

    So I’d say that data is a dict and here’s the .get() documentation.

    What Python object json.load() will return depends on the input that you’ll give him.

    Example with json.loads() which is the same thing, but on strings:

    >>> json.loads('[1, 2, "dog"]')
    [1, 2, 'dog']
    >>> json.loads('{"animals": ["cat", "dog"], "4": 4}') 
    {'animals': ['cat', 'dog'], '4': 4}
    >>> json.loads('"dog"') 
    'dog'
    

    As you see there are a endless number of possiblities (since they could also be nested).

    If you don’t know the format of the json file you’re going to parse then yes, you should come up with some hack to understand its structure, but it would be best to know in advance how is structured. Since your going to use its information you should probably know that (or be allowed to know that).


    I see that you’ve already found out, but for future comers reference I’d like to point that to parse url requests with json one needs to specify that. As it was pointed out to you in this answer.

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

Sidebar

Related Questions

Just a small question regarding joins. I have a table with around 30 fields
I just have a quick question about how to get the length of a
I have a question that I just don't feel like I've found a satisfactory
I have just read a question regarding initializing multidimensional vectors ( question ) and
I have a question regarding syntax that I've been coming across in JavaScript. What
I have a question regarding implementation of smart-search features. For example, consider something like
I just have a question regarding changing an Activities layout. Basicly my problem is:
I just have a quick best practice question regarding custom cells in a UITableView.
I have a question regarding static members and functions of non static classes. I
I have a question regarding the threads that my application spawns during execution and

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.