Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

json

Reading rather large JSON files

August 20, 2022 by Magenaut

Possible Duplicate:
Is there a memory efficient and fast way to load big JSON files?

Categories Python, Q&A Tags json, python Leave a comment

HTTP requests and JSON parsing in Python

August 20, 2022 by Magenaut

I want to dynamically query Google Maps through the Google Directions API. As an example, this request calculates the route from Chicago, IL to Los Angeles, CA via two waypoints in Joplin, MO and Oklahoma City, OK:

Categories Python, Q&A Tags json, python, python-2.7 Leave a comment

How to JSON serialize sets?

August 20, 2022 by Magenaut

I have a Python set that contains objects with __hash__ and __eq__ methods in order to make certain no duplicates are included in the collection.

Categories Python, Q&A Tags json, python, serialization, set Leave a comment

Converting dictionary to JSON

August 20, 2022 by Magenaut

r = {'is_claimed': 'True', 'rating': 3.5} r = json.dumps(r) file.write(str(r['rating'])) I am not able to access my data in the JSON. What am I doing wrong? TypeError: string indices must be integers, not str Answers: Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve … Read more

Categories Python, Q&A Tags dictionary, json, python, python-2.7 Leave a comment

Converting JSON String to Dictionary Not List

August 19, 2022 by Magenaut

I am trying to pass in a JSON file and convert the data into a dictionary.

Categories Python, Q&A Tags json, python Leave a comment

Python: json.loads returns items prefixing with ‘u’

August 19, 2022 by Magenaut

I’ll be receiving a JSON encoded string form Obj-C, and I am decoding a dummy string (for now) like the code below. My output comes out with character ‘u’ prefixing each item:

Categories Python, Q&A Tags json, python Leave a comment

Serializing class instance to JSON

August 19, 2022 by Magenaut

I am trying to create a JSON string representation of a class instance and having difficulty. Let’s say the class is built like this:

Categories Python, Q&A Tags json, pickle, python, serialization Leave a comment

What are the differences between json and simplejson Python modules?

August 19, 2022 by Magenaut

I have seen many projects using simplejson module instead of json module from the Standard Library. Also, there are many different simplejson modules. Why would use these alternatives, instead of the one in the Standard Library?

Categories Python, Q&A Tags json, python, simplejson Leave a comment

How to convert raw javascript object to a dictionary?

August 19, 2022 by Magenaut

When screen-scraping some website, I extract data from <script> tags.
The data I get is not in standard JSON format. I cannot use json.loads().

Categories Python, Q&A Tags javascript, json, python, web-scraping Leave a comment

json.dumps vs flask.jsonify

August 19, 2022 by Magenaut

I am not sure I understand the purpose of the flask.jsonify method. I try to make a JSON string from this:

Categories Python, Q&A Tags flask, json, python Leave a comment
Older posts
Newer posts
← Previous Page1 … Page20 Page21 Page22 … Page30 Next →
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress