Skip to content

Conversation

@mplewis
Copy link
Contributor

@mplewis mplewis commented Feb 5, 2015

I've added the following to the JSON section:

  • How to use simplejson in place of json in older versions of Python
  • How to load and save JSON from/to file objects instead of strings

I've also reworded the intro paragraph a little and cleaned up the language of the simplejson paragraph.

Please take a look and tell me what you think! Thanks.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't we discuss in an earlier PR that we weren't going to cover working with file objects?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't see any such discussion in the previous JSON PRs.

Why not cover working with file objects? Parsing JSON from a file and writing JSON to an output file is a pretty common use case of the JSON library.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please read the review comments on https://github.com/kennethreitz/python-guide/pull/511

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, thanks! I couldn't see the comments on the outdated diffs before.
I'll remove the file object sections.

On Tue, Feb 10, 2015 at 10:00 PM, Ian Cordasco [email protected]
wrote:

In docs/scenarios/json.rst
https://github.com/kennethreitz/python-guide/pull/515#discussion_r24473205
:

@@ -39,10 +39,48 @@ You can also convert a the following to JSON:
print(json.dumps(d))
'{"first_name": "Guido", "last_name": "Rossum", "titles": ["BDFL", "Developer"]}'

+Working with File Objects
+-------------------------

Please read the review comments on #511
https://github.com/kennethreitz/python-guide/pull/511


Reply to this email directly or view it on GitHub
https://github.com/kennethreitz/python-guide/pull/515/files#r24473205.

Matthew Lewis
mplewis.com | (612) 600-6907

@mplewis
Copy link
Contributor Author

mplewis commented Feb 11, 2015

Just removed the section on file objects—let me know if you find anything else you think should be changed.

@sigmavirus24
Copy link
Contributor

Thanks @mplewis !

sigmavirus24 added a commit that referenced this pull request Feb 15, 2015
@sigmavirus24 sigmavirus24 merged commit e42e21f into realpython:master Feb 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants