Questions tagged [simplejson]

Simple, fast, extensible JSON encoder/decoder for Python.

simplejson exposes an API familiar to users of the standard library marshal and pickle modules.

simplejson was previously hosted at http://code.google.com/p/simplejson/, with more current information available at http://pypi.python.org/pypi/simplejson/ and http://simplejson.github.com/simplejson/.

Disambiguation

JSON.simple is a Java library with a similar name. On StackOverflow, JSON.simple questions are tagged with .

298 questions
-1
votes
1 answer

Why does my method for parsing a JSON document only return lists with one element?

I'm working on a Java version of the board game RoboRally, and I'm currently working on a class that parses a JSON-document as a part of generating the game board. It almost works as intended, but not quite. The JSON document is formated as a…
-1
votes
1 answer

What is causing this JSONDecodeError?

I am trying to setup the itunes Media Player in HASSio. I have the REST API running on my mac, and I am able to pull it up in my browser and see that it is running. From within HA, I am able to adjust the volume and change to the next song,…
nikedude
  • 13
  • 4
-1
votes
4 answers

Code Review for Creating .JSON file with Python

I'm having trouble with the following code. It's supposed to eventually create this "ages.json" file (because initially it doesn't exist in the directory. Then, every time it runs, it increases the age in the file), but that is not happening. …
-1
votes
1 answer

JSON.parse() function not working in javascript

I have a list that i am trying to parse to a json object, ["Harry ", "Potter ", "Name ", "Batman"]. I am using Django templates for this. I have parsed the list using simplejson.dumps(). I am trying to parse this in my javascript code.It is working…
Unknown
  • 67
  • 7
-1
votes
2 answers

Python simplejson not converting true

Why doesn't this work? I'm reading for simplejson JsonDecoder, true should be parsable and translated to True. % python >>> import simplejson as json >>> print json.loads({"bool":true}) Traceback (most recent call last): File "", line 1, in…
maverick
  • 2,902
  • 2
  • 19
  • 15
-2
votes
1 answer

python vscode ImportError: No module named simplejson

i have import simplejson in my code, and installed using pip install simplejson using python3 so as i checked, it perfectly runs in my terminal opening the file but when i try to build in VScode, it shows an error like, see the error in this link…
Doyeon
  • 7
  • 7
-2
votes
1 answer

Extracting geometry / location keys from Google API JSON in Python 3: AttributeError: 'list' object has no attribute 'read'

I am geocoding with JSON as output and then want to extract geometry : location keys to store the lat | lng information for subsequent visualization. I get the error message AttributeError: 'list' object has no attribute 'read' I did not find…
student
  • 1
  • 2
-2
votes
2 answers

import simplejson - no module named simplejson

my python version is 2.7.14 in windows 7 I have import simplejson with command "pip install simplejson" my code is import os import platform import re import subprocess import sys import threading import simplejson error messge is ImportError: No…
-3
votes
4 answers

Why can't read a .json?

I want to read a .json using library json-simple, my json file is: { "Subjects": { "subject1": "MIS", "subject2": "DBMS", "subject3": "UML" } } And my code is: import java.io.*; import java.util.*; import…
riram
  • 162
  • 6
-3
votes
2 answers

How to ignore \ before " in simplejson?

In python simplejson my dictionary is like >>> s= {u'hello': u"Hi, i'm here"} >>> simplejson.dumps(s) '{"hello": "Hi, i\'m here"}' But I want like '{"hello": "Hi, i'm here"}' How to do that?
user2605977
  • 269
  • 4
  • 12
-4
votes
1 answer

Is there a way to remove a json key/value using python and simplejson/json

As the title says I'm looking to strip my json of specific keys, is this possible using json or simplejson with python?
user10847
  • 31
  • 1
  • 1
  • 6
-5
votes
1 answer

how to ignore \ in the following code?

>>> import simplejson >>> data={'s': 1, 'd': {'kwds': {u'"ramana"': {u'"ramana"': [(0L, 7L)]}}}} >>> print simplejson.dumps(data, ensure_ascii=False) Then I got like this. {"s": 1, "d": {"kwds": {"\"ramana\"": {"\"ramana\"": [[0, 7]]}}}} But I…
user2605977
  • 269
  • 4
  • 12
-8
votes
1 answer

Can someone help me with creating below JSON in java

Can i get any api's available to convert json to java object? { "trigger": { "name": "new user2", "input": { "auth": "EaIv0NlXiDWJrpvLkAdP", "domain": "rangersrockerz" } } }
Altamash Shaikh
  • 99
  • 1
  • 1
  • 7
1 2 3
19
20