Morning Buds Part II

Sep 19, 2008
373,145
24,396
He stopped wearing virtually all his gold, one of his identifying marks, after helping with the cleanup after Hurricane Katrina in 2005. He said, "As a Christian, when I saw other people lose their lives and lose their land and property ... I felt that it would be a sin before God for me to continue wearing my gold. I felt it would be insensitive and disrespectful to the people who lost everything, so I stopped wearing my gold."[60]
 

LarryFisherman

o̯̘̍͋̀͌̂͒͋͋ͯ̿ͯͦ̈́ͬ͒̚̚
May 9, 2013
6,375
2,666
Arvada, CO
where mydictionary=the title of your dictionary and indent=an interger (depends on how much formatting/truncation etc you want)

That should dump the contents of your dictionary (via JSON) and the indent variable should provide some formatting

Like I said, dunno if that's what you need, though. Or if it works.
 
Sep 19, 2008
373,145
24,396
(json.dumps(mydictionary, indent=someValue))

You can also add other variables in there if you need to.

IT['S NOT WORKING

The dump has a long string as an output

{
"data": [
{
"entry1":{"name\":\"Aven Jones\",\"email\":null,\"phone\":null}

The problem is you literally CANNOT extract the name value from the DICTIONARY
 

LarryFisherman

o̯̘̍͋̀͌̂͒͋͋ͯ̿ͯͦ̈́ͬ͒̚̚
May 9, 2013
6,375
2,666
Arvada, CO
IT['S NOT WORKING

The dump has a long string as an output

{
"data": [
{
"entry1":{"name\":\"Aven Jones\",\"email\":null,\"phone\":null}

The problem is you literally CANNOT extract the name value from the DICTIONARY

I did my best for something i have exactly 15 minutes looking into.

Why don't you create a reproducible scenario and then myself (and potentially others that actually know python) might be able to more clearly help

I don't understand what you're trying to do when you yell at me in all caps ITS NOT WORKING

There is a separator value that might help parse some of that out.
 
  • Like
Reactions: HFBCommenter

LarryFisherman

o̯̘̍͋̀͌̂͒͋͋ͯ̿ͯͦ̈́ͬ͒̚̚
May 9, 2013
6,375
2,666
Arvada, CO
tell me more about the seperator value

i don't know anything it about it. my guess would be its presence allows better filtering by instructing the string to separate values by the appropriate punctuation (that could be , or : or _ or whatever)

If that's the case, I don't think it's going to help you. I'm still confused though. you're saying you can't pull a name_value out of the dictionary, but it looks like it's providing you a "name":Aven jones

Also, i suppose it's irrelevant since you want a json dump and it is spitting it out as some text string.
 
  • Like
Reactions: HFBCommenter
Sep 19, 2008
373,145
24,396
Eat poop.

In-a-world-where-you-can-be-anything-be-kind-1-580x386.jpg
 

Ad

Upcoming events

Ad

Ad

-->