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
0
votes
4 answers

Parsing Strings from json in Python

I am parsing a JSON document in Python and I have gotten nearly the whole process to work except I am having trouble converting a GPS string into the correct form. I have the following form: "gsx$gps":{"$t":"44°21′N 68°13′W\ufeff / \ufeff44.35°N…
clifgray
  • 4,313
  • 11
  • 67
  • 116
0
votes
1 answer

Get Python 2.7's 'json' to not throw an exception when it encounters random byte strings

Trying to serialize a dict object into a json string using Python 2.7's json (ie: import json). Example: json.dumps({ 'property1': 'A normal string', 'pickled_property': \u0002]qu0000U\u0012 }) The object has some byte strings in it…
Chris Dutrow
  • 48,402
  • 65
  • 188
  • 258
0
votes
2 answers

Python: Extract Attribute within JSON data structure

I am currently parsing eBay data using eBay public API, I have figured out the way to parse the JSON structure except for some JSON elements. Here is the JSON structure that I am looking at: {u'itemId': [u'370640300983'],…
add-semi-colons
  • 18,094
  • 55
  • 145
  • 232
0
votes
1 answer

inconsistent simplejson conversion of quotes

I've read the simplejson docs and don't understand why it sometimes returns a json object with single quotes (which php can't understand) and other times returns an escaped sequence of double quotes (also not recognized in php). I could probably do…
Marc Maxmeister
  • 4,191
  • 4
  • 40
  • 54
0
votes
2 answers

DJANGO simplejson

Good afternoon..i have a model with a class like this: class Reportage: def get_num(self): end_date = self.date.end_date start_date = self.date.start_date duration = time.mktime(end_date.timetuple()) -…
dottorg
  • 15
  • 1
  • 4
0
votes
1 answer

Django add textfield on click

I am writing a django recipe website and have a question about JSON Field and forms I am trying to write the create recipe function for the site and wanted to do two things: I want to add text fields on mouse click similarly to adding attachments…
snackerfish
  • 109
  • 4
  • 14
-1
votes
2 answers

Get corresponding value from json key in python

currently I have the following which parses a json api.. import simplejson import urllib2 f = urllib2.urlopen('http://fanart.tv/webservice/series/f5b8e776c35e7536eac132802b03281f/80349/json/tvthumb/') data = simplejson.load(f) imagetypes =…
Michael Esteves
  • 1,445
  • 3
  • 21
  • 38
-1
votes
1 answer

How to extract value with simplejson?

I have the following json string: {"response":[[{"uid":123456,"name":"LA_"}],[{"cid":"1","name":"Something"}],[{"cid":1,"name":"Something-else"}]]} How can I get Something value? I do the following jstr = json.loads(my_string) if…
LA_
  • 19,823
  • 58
  • 172
  • 308
-1
votes
2 answers

SimpleJSON how the get "location" item values in JSON array

"results" : [ { "geometry" : { "location" : { "lat" : 50.4501, "lng" : 30.5234 }, "viewport" : { "northeast" : { "lat" :…
-1
votes
1 answer

How to load 10 levels assigned to 10 buttons in unity?

How to load list object Data in Unity? I want 10 levels assigned to 10 buttons. I think use jsonNode. Hope everybody helps, please. I don't want to do it like this. Does anyone have a faster way? [Serializable] public class LoadLevel{ public…
Davil
  • 11
  • 4
-1
votes
1 answer

Create list of custom objects from flat JSON data

I want to create an arraylist of type Adapter from a JSON. But since the JSON is not in arraylist format, I'm unable to use gson.fromJson() method. Is there any way by which I can create a list of my custom object by parsing the following JSON? JSON…
u13k
  • 9
  • 1
-1
votes
1 answer

json.decoder.JSONDecodeError: Invalid \escape

I've tested if I can load the JSON. First I import the built-in JSON module Python 3.9.9 (tags/v3.9.9:ccb0e6a, Nov 15 2021, 18:08:50) [MSC v.1929 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>>…
Honcky
  • 25
  • 6
-1
votes
1 answer

Python json.loads fails with error- "simplejson.errors.JSONDecodeError: Invalid control character '\x00' at: line 1 column 536 (char 535)"

I have a json file and I am trying to load its contents line by line using json.loads command but I am getting below error- "simplejson.errors.JSONDecodeError: Invalid control character '\x00' at: line 1 column 536 (char 535)" Code snippet- import…
-1
votes
1 answer

java Play add jar to lib

I'm trying to add org.json.simple. I have created my lib folder in root and added the jar file and restarted my project with sbt run. I still get package org.json.simple does not exist. I tried to add to the build.sbt (this did not…
majortom84
  • 611
  • 1
  • 8
  • 16
-1
votes
1 answer

Using SimpleJSON C# help getting info

Do not say there is built in Unity Json or to download the Lindq for C# I am using SimpleJSON I am trying to read the json file and add the elements to a list so I can call them easier. I cannot figure out how to add all of "Heads" values to list.…
user3277468
  • 141
  • 2
  • 11
1 2 3
19
20